From 40a91cb8480866e3e44a429fe3442cb77cdeed26 Mon Sep 17 00:00:00 2001 From: Sheri Nguyen Date: Thu, 13 Oct 2022 15:37:26 -0800 Subject: [PATCH 01/18] Updates for dbt-utils to dbt-core cross-db macro migration --- integration_tests/dbt_project.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/integration_tests/dbt_project.yml b/integration_tests/dbt_project.yml index d387562..56b53ea 100644 --- a/integration_tests/dbt_project.yml +++ b/integration_tests/dbt_project.yml @@ -31,4 +31,4 @@ seeds: dispatch: - macro_namespace: dbt_utils - search_order: ['spark_utils', 'dbt_utils'] \ No newline at end of file + search_order: ['!!!!!!! REPLACE 'spark' WITH 'spark','databricks' OR EQUIV !!!!!!!_utils', 'dbt_utils'] \ No newline at end of file From 29af07318194bf550a77735e0c771b3016632bdc Mon Sep 17 00:00:00 2001 From: Sheri Nguyen <94874400+fivetran-sheringuyen@users.noreply.github.com> Date: Thu, 13 Oct 2022 15:37:28 -0800 Subject: [PATCH 02/18] Updating dbt version --- dbt_project.yml | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/dbt_project.yml b/dbt_project.yml index 9bc7be7..f3c9ae1 100644 --- a/dbt_project.yml +++ b/dbt_project.yml @@ -1,8 +1,7 @@ name: 'apple_search_ads' -version: '0.1.0' +version: '0.2.0' config-version: 2 -require-dbt-version: [">=1.0.0", "<2.0.0"] - +require-dbt-version: [">=1.2.0", "<2.0.0"] vars: apple_search_ads: organization: "{{ ref('stg_apple_search_ads__organization') }}" @@ -15,14 +14,12 @@ vars: keyword_history: "{{ ref('stg_apple_search_ads__keyword_history') }}" keyword_report: "{{ ref('stg_apple_search_ads__keyword_report') }}" search_term_report: "{{ ref('stg_apple_search_ads__search_term_report') }}" - apple_search_ads__ad_group_passthrough_metrics: [] apple_search_ads__ad_passthrough_metrics: [] apple_search_ads__campaign_passthrough_metrics: [] - apple_search_ads__keyword_passthrough_metrics: [] + apple_search_ads__keyword_passthrough_metrics: [] apple_search_ads__search_term_passthrough_metrics: [] - models: apple_search_ads: +schema: apple_search_ads - +materialized: table \ No newline at end of file + +materialized: table From 978def797ceb34cb74c290990c10f4edfaa95c5c Mon Sep 17 00:00:00 2001 From: Sheri Nguyen <94874400+fivetran-sheringuyen@users.noreply.github.com> Date: Thu, 13 Oct 2022 15:37:29 -0800 Subject: [PATCH 03/18] Updating package dependencies --- packages.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/packages.yml b/packages.yml index 4dcb5f2..f78b6b3 100644 --- a/packages.yml +++ b/packages.yml @@ -1,4 +1,3 @@ packages: - - package: fivetran/apple_search_ads_source - version: [">=0.1.0", "<0.2.0"] - \ No newline at end of file +- package: fivetran/apple_search_ads_source + version: [">=0.1.0", "<0.2.0"] From 670a1fdb8fb38839f2f138030f9f0068c8a929a5 Mon Sep 17 00:00:00 2001 From: Sheri Nguyen <94874400+fivetran-sheringuyen@users.noreply.github.com> Date: Thu, 13 Oct 2022 15:37:30 -0800 Subject: [PATCH 04/18] deleting file: .circleci/config.yml --- .circleci/config.yml | 82 -------------------------------------------- 1 file changed, 82 deletions(-) delete mode 100644 .circleci/config.yml diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 682c566..0000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,82 +0,0 @@ -version: 2 - -jobs: - build: - docker: - - image: circleci/python:3.7.9-stretch - - steps: - - checkout - - - run: - run: setup_creds - command: | - echo $GCLOUD_SERVICE_KEY | base64 --decode --ignore-garbage > ${HOME}/gcloud-service-key.json - - run: - name: "Setup dbt" - command: | - sudo apt install libsasl2-dev - python3 -m venv venv - . venv/bin/activate - pip install --upgrade pip setuptools - pip install -r integration_tests/requirements.txt - mkdir -p ~/.dbt - cp integration_tests/ci/sample.profiles.yml ~/.dbt/profiles.yml - - run: - name: "Run Tests - Spark" - command: | - . venv/bin/activate - echo `pwd` - cd integration_tests - dbt deps - dbt seed --target spark --full-refresh - dbt run --target spark --full-refresh - dbt run --vars '{apple_search_ads__using_search_terms: true}' --target spark - dbt test --target spark - - run: - name: "Run Tests - Redshift" - command: | - . venv/bin/activate - echo `pwd` - cd integration_tests - dbt deps - dbt seed --target redshift --full-refresh - dbt run --target redshift --full-refresh - dbt run --vars '{apple_search_ads__using_search_terms: true}' --target redshift - dbt test --target redshift - - run: - name: "Run Tests - Snowflake" - command: | - . venv/bin/activate - echo `pwd` - cd integration_tests - dbt deps - dbt seed --target snowflake --full-refresh - dbt run --target snowflake --full-refresh - dbt run --vars '{apple_search_ads__using_search_terms: true}' --target snowflake --full-refresh - dbt test --target snowflake - - run: - name: "Run Tests - BigQuery" - environment: - GCLOUD_SERVICE_KEY_PATH: "/home/circleci/gcloud-service-key.json" - - command: | - . venv/bin/activate - echo `pwd` - cd integration_tests - dbt deps - dbt seed --target bigquery --full-refresh - dbt run --target bigquery --full-refresh - dbt run --vars '{apple_search_ads__using_search_terms: true}' --target bigquery --full-refresh - dbt test --target bigquery - - run: - name: "Run Tests - Postgres" - command: | - . venv/bin/activate - echo `pwd` - cd integration_tests - dbt deps - dbt seed --target postgres --full-refresh - dbt run --target postgres --full-refresh - dbt run --vars '{apple_search_ads__using_search_terms: true}' --target postgres --full-refresh - dbt test --target postgres \ No newline at end of file From 835d68a8eeff53b269c14163d92ccb2bcb479060 Mon Sep 17 00:00:00 2001 From: Sheri Nguyen <94874400+fivetran-sheringuyen@users.noreply.github.com> Date: Thu, 13 Oct 2022 15:37:31 -0800 Subject: [PATCH 05/18] deleting file: integration_tests/requirements.txt --- integration_tests/requirements.txt | 6 ------ 1 file changed, 6 deletions(-) delete mode 100644 integration_tests/requirements.txt diff --git a/integration_tests/requirements.txt b/integration_tests/requirements.txt deleted file mode 100644 index 89c6ccb..0000000 --- a/integration_tests/requirements.txt +++ /dev/null @@ -1,6 +0,0 @@ -dbt-snowflake~=1.0.0 -dbt-bigquery~=1.0.0 -dbt-redshift~=1.0.0 -dbt-postgres~=1.0.0 -dbt-spark~=1.0.0 -dbt-spark[PyHive]~=1.0.0 From adf56abd7d27ea94545566c0d9fdd9fb972cfa0a Mon Sep 17 00:00:00 2001 From: Sheri Nguyen <94874400+fivetran-sheringuyen@users.noreply.github.com> Date: Thu, 13 Oct 2022 15:37:31 -0800 Subject: [PATCH 06/18] deleting file: integration_tests/ci/sample.profiles.yml --- integration_tests/ci/sample.profiles.yml | 59 ------------------------ 1 file changed, 59 deletions(-) delete mode 100644 integration_tests/ci/sample.profiles.yml diff --git a/integration_tests/ci/sample.profiles.yml b/integration_tests/ci/sample.profiles.yml deleted file mode 100644 index 7d1a7b4..0000000 --- a/integration_tests/ci/sample.profiles.yml +++ /dev/null @@ -1,59 +0,0 @@ -# HEY! This file is used in the Apple Search Ads integrations tests with CircleCI. -# You should __NEVER__ check credentials into version control. Thanks for reading :) - -config: - send_anonymous_usage_stats: False - use_colors: True - -integration_tests: - target: snowflake - outputs: - redshift: - type: redshift - host: "{{ env_var('CI_REDSHIFT_DBT_HOST') }}" - user: "{{ env_var('CI_REDSHIFT_DBT_USER') }}" - pass: "{{ env_var('CI_REDSHIFT_DBT_PASS') }}" - dbname: "{{ env_var('CI_REDSHIFT_DBT_DBNAME') }}" - port: 5439 - schema: apple_search_ads_integration_tests - threads: 8 - bigquery: - type: bigquery - method: service-account - keyfile: "{{ env_var('GCLOUD_SERVICE_KEY_PATH') }}" - project: 'dbt-package-testing' - schema: apple_search_ads_integration_tests - threads: 8 - snowflake: - type: snowflake - account: "{{ env_var('CI_SNOWFLAKE_DBT_ACCOUNT') }}" - user: "{{ env_var('CI_SNOWFLAKE_DBT_USER') }}" - password: "{{ env_var('CI_SNOWFLAKE_DBT_PASS') }}" - role: "{{ env_var('CI_SNOWFLAKE_DBT_ROLE') }}" - database: "{{ env_var('CI_SNOWFLAKE_DBT_DATABASE') }}" - warehouse: "{{ env_var('CI_SNOWFLAKE_DBT_WAREHOUSE') }}" - schema: apple_search_ads_integration_tests - threads: 8 - spark: - type: spark - method: http - schema: apple_search_ads_integration_tests - host: "{{ env_var('CI_SPARK_DBT_HOST') }}" - organization: "{{ env_var('CI_SPARK_DBT_ORGANIZATION') }}" - token: "{{ env_var('CI_SPARK_DBT_TOKEN') }}" - cluster: "{{ env_var('CI_SPARK_DBT_CLUSTER') }}" - port: 443 - connect_timeout: 60 - connect_retries: 5 - threads: 4 - postgres: - type: postgres - host: "{{ env_var('CI_POSTGRES_DBT_HOST') }}" - user: "{{ env_var('CI_POSTGRES_DBT_USER') }}" - password: "{{ env_var('CI_POSTGRES_DBT_PASS') }}" - port: 5432 - dbname: "{{ env_var('CI_POSTGRES_DBT_DATABASE') }}" - schema: apple_search_ads_integration_tests - threads: 8 - keepalives_idle: 0 - sslmode: prefer \ No newline at end of file From 083294dc8379859ecd60eaa6549fc0ddfe3ccf5d Mon Sep 17 00:00:00 2001 From: Sheri Nguyen <94874400+fivetran-sheringuyen@users.noreply.github.com> Date: Thu, 13 Oct 2022 15:37:32 -0800 Subject: [PATCH 07/18] adding file: integration_tests/requirements.txt --- integration_tests/requirements.txt | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 integration_tests/requirements.txt diff --git a/integration_tests/requirements.txt b/integration_tests/requirements.txt new file mode 100644 index 0000000..46e2da6 --- /dev/null +++ b/integration_tests/requirements.txt @@ -0,0 +1,7 @@ +dbt-snowflake~=1.2.0 +dbt-bigquery~=1.2.0 +dbt-redshift~=1.2.0 +dbt-postgres~=1.2.0 +dbt-spark~=1.2.0 +dbt-spark[PyHive]~=1.2.0 +dbt-databricks~=1.2.0 \ No newline at end of file From 805bb482eb3487b74dfbec1b0c4d2792b0cefd68 Mon Sep 17 00:00:00 2001 From: Sheri Nguyen <94874400+fivetran-sheringuyen@users.noreply.github.com> Date: Thu, 13 Oct 2022 15:37:32 -0800 Subject: [PATCH 08/18] adding file: integration_tests/ci/sample.profiles.yml --- integration_tests/ci/sample.profiles.yml | 54 ++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 integration_tests/ci/sample.profiles.yml diff --git a/integration_tests/ci/sample.profiles.yml b/integration_tests/ci/sample.profiles.yml new file mode 100644 index 0000000..f524bd8 --- /dev/null +++ b/integration_tests/ci/sample.profiles.yml @@ -0,0 +1,54 @@ + +# HEY! This file is used in the dbt package integrations tests with CircleCI. +# You should __NEVER__ check credentials into version control. Thanks for reading :) + +config: + send_anonymous_usage_stats: False + use_colors: True + +integration_tests: + target: redshift + outputs: + redshift: + type: redshift + host: "{{ env_var('CI_REDSHIFT_DBT_HOST') }}" + user: "{{ env_var('CI_REDSHIFT_DBT_USER') }}" + pass: "{{ env_var('CI_REDSHIFT_DBT_PASS') }}" + dbname: "{{ env_var('CI_REDSHIFT_DBT_DBNAME') }}" + port: 5439 + schema: + threads: 8 + bigquery: + type: bigquery + method: service-account-json + project: 'dbt-package-testing' + schema: + threads: 8 + keyfile_json: "{{ env_var('GCLOUD_SERVICE_KEY') | as_native }}" + snowflake: + type: snowflake + account: "{{ env_var('CI_SNOWFLAKE_DBT_ACCOUNT') }}" + user: "{{ env_var('CI_SNOWFLAKE_DBT_USER') }}" + password: "{{ env_var('CI_SNOWFLAKE_DBT_PASS') }}" + role: "{{ env_var('CI_SNOWFLAKE_DBT_ROLE') }}" + database: "{{ env_var('CI_SNOWFLAKE_DBT_DATABASE') }}" + warehouse: "{{ env_var('CI_SNOWFLAKE_DBT_WAREHOUSE') }}" + schema: + threads: 8 + postgres: + type: postgres + host: "{{ env_var('CI_POSTGRES_DBT_HOST') }}" + user: "{{ env_var('CI_POSTGRES_DBT_USER') }}" + pass: "{{ env_var('CI_POSTGRES_DBT_PASS') }}" + dbname: "{{ env_var('CI_POSTGRES_DBT_DBNAME') }}" + port: 5432 + schema: + threads: 8 + databricks: + catalog: null + host: "{{ env_var('CI_DATABRICKS_DBT_HOST') }}" + http_path: "{{ env_var('CI_DATABRICKS_DBT_HTTP_PATH') }}" + schema: + threads: 2 + token: "{{ env_var('CI_DATABRICKS_DBT_TOKEN') }}" + type: databricks \ No newline at end of file From 3170f48412b3a140f49b07761bf90dfc96f3304e Mon Sep 17 00:00:00 2001 From: Sheri Nguyen <94874400+fivetran-sheringuyen@users.noreply.github.com> Date: Thu, 13 Oct 2022 15:37:33 -0800 Subject: [PATCH 09/18] adding file: .buildkite/pipeline.yml --- .buildkite/pipeline.yml | 73 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 .buildkite/pipeline.yml diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml new file mode 100644 index 0000000..b84fe04 --- /dev/null +++ b/.buildkite/pipeline.yml @@ -0,0 +1,73 @@ +steps: + - label: ":postgres: Run Tests - Postgres" + key: "run-dbt-postgres" + plugins: + - docker#v3.13.0: + image: "python:3.8" + shell: [ "/bin/bash", "-e", "-c" ] + environment: + - "BASH_ENV=/tmp/.bashrc" + - "CI_POSTGRES_DBT_DBNAME" + - "CI_POSTGRES_DBT_HOST" + - "CI_POSTGRES_DBT_PASS" + - "CI_POSTGRES_DBT_USER" + commands: | + bash .buildkite/scripts/run_models.sh postgres + + - label: ":snowflake-db: Run Tests - Snowflake" + key: "run_dbt_snowflake" + plugins: + - docker#v3.13.0: + image: "python:3.8" + shell: [ "/bin/bash", "-e", "-c" ] + environment: + - "BASH_ENV=/tmp/.bashrc" + - "CI_SNOWFLAKE_DBT_ACCOUNT" + - "CI_SNOWFLAKE_DBT_DATABASE" + - "CI_SNOWFLAKE_DBT_PASS" + - "CI_SNOWFLAKE_DBT_ROLE" + - "CI_SNOWFLAKE_DBT_USER" + - "CI_SNOWFLAKE_DBT_WAREHOUSE" + commands: | + bash .buildkite/scripts/run_models.sh snowflake + + - label: ":gcloud: Run Tests - BigQuery" + key: "run_dbt_bigquery" + plugins: + - docker#v3.13.0: + image: "python:3.8" + shell: [ "/bin/bash", "-e", "-c" ] + environment: + - "BASH_ENV=/tmp/.bashrc" + - "GCLOUD_SERVICE_KEY" + commands: | + bash .buildkite/scripts/run_models.sh bigquery + + - label: ":amazon-redshift: Run Tests - Redshift" + key: "run_dbt_redshift" + plugins: + - docker#v3.13.0: + image: "python:3.8" + shell: [ "/bin/bash", "-e", "-c" ] + environment: + - "BASH_ENV=/tmp/.bashrc" + - "CI_REDSHIFT_DBT_DBNAME" + - "CI_REDSHIFT_DBT_HOST" + - "CI_REDSHIFT_DBT_PASS" + - "CI_REDSHIFT_DBT_USER" + commands: | + bash .buildkite/scripts/run_models.sh redshift + + - label: ":upside_down_face: Run Tests - Databricks" + key: "run_dbt_databricks" + plugins: + - docker#v3.13.0: + image: "python:3.8" + shell: [ "/bin/bash", "-e", "-c" ] + environment: + - "BASH_ENV=/tmp/.bashrc" + - "CI_DATABRICKS_DBT_HOST" + - "CI_DATABRICKS_DBT_HTTP_PATH" + - "CI_DATABRICKS_DBT_TOKEN" + commands: | + bash .buildkite/scripts/run_models.sh databricks \ No newline at end of file From 8b992352344020d7c05118f2fb4530be1dde1c65 Mon Sep 17 00:00:00 2001 From: Sheri Nguyen <94874400+fivetran-sheringuyen@users.noreply.github.com> Date: Thu, 13 Oct 2022 15:37:33 -0800 Subject: [PATCH 10/18] adding file: .buildkite/scripts/run_models.sh --- .buildkite/scripts/run_models.sh | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .buildkite/scripts/run_models.sh diff --git a/.buildkite/scripts/run_models.sh b/.buildkite/scripts/run_models.sh new file mode 100644 index 0000000..a18ae39 --- /dev/null +++ b/.buildkite/scripts/run_models.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +apt-get update +apt-get install libsasl2-dev + +python3 -m venv venv +. venv/bin/activate +pip install --upgrade pip setuptools +pip install -r integration_tests/requirements.txt +mkdir -p ~/.dbt +cp integration_tests/ci/sample.profiles.yml ~/.dbt/profiles.yml + +db=$1 +echo `pwd` +cd integration_tests +dbt deps +dbt seed --target "$db" --full-refresh +dbt run --target "$db" --full-refresh +dbt test --target "$db" +## UPDATE FOR VARS HERE, IF NO VARS, PLEASE REMOVE +dbt run --vars '{apple_search_ads__using_search_terms: True}' --target "$db" --full-refresh +dbt test --target "$db" +### END VARS CHUNK, REMOVE IF NOT USING \ No newline at end of file From da636656aeb855e4fd5291cae5bb4dbe3cc94998 Mon Sep 17 00:00:00 2001 From: Sheri Nguyen <94874400+fivetran-sheringuyen@users.noreply.github.com> Date: Thu, 13 Oct 2022 15:37:34 -0800 Subject: [PATCH 11/18] adding file: .buildkite/hooks/pre-command --- .buildkite/hooks/pre-command | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .buildkite/hooks/pre-command diff --git a/.buildkite/hooks/pre-command b/.buildkite/hooks/pre-command new file mode 100644 index 0000000..04c85c0 --- /dev/null +++ b/.buildkite/hooks/pre-command @@ -0,0 +1,24 @@ +#!/bin/bash + +set -e + +# Export secrets for Docker containers. +# Restrict exposing secrets only to the steps that need them +export GCLOUD_SERVICE_KEY=$(gcloud secrets versions access latest --secret="GCLOUD_SERVICE_KEY" --project="dbt-package-testing-363917") +export CI_POSTGRES_DBT_HOST=$(gcloud secrets versions access latest --secret="CI_POSTGRES_DBT_HOST" --project="dbt-package-testing-363917") +export CI_POSTGRES_DBT_USER=$(gcloud secrets versions access latest --secret="CI_POSTGRES_DBT_USER" --project="dbt-package-testing-363917") +export CI_POSTGRES_DBT_PASS=$(gcloud secrets versions access latest --secret="CI_POSTGRES_DBT_PASS" --project="dbt-package-testing-363917") +export CI_POSTGRES_DBT_DBNAME=$(gcloud secrets versions access latest --secret="CI_POSTGRES_DBT_DBNAME" --project="dbt-package-testing-363917") +export CI_REDSHIFT_DBT_DBNAME=$(gcloud secrets versions access latest --secret="CI_REDSHIFT_DBT_DBNAME" --project="dbt-package-testing-363917") +export CI_REDSHIFT_DBT_HOST=$(gcloud secrets versions access latest --secret="CI_REDSHIFT_DBT_HOST" --project="dbt-package-testing-363917") +export CI_REDSHIFT_DBT_PASS=$(gcloud secrets versions access latest --secret="CI_REDSHIFT_DBT_PASS" --project="dbt-package-testing-363917") +export CI_REDSHIFT_DBT_USER=$(gcloud secrets versions access latest --secret="CI_REDSHIFT_DBT_USER" --project="dbt-package-testing-363917") +export CI_SNOWFLAKE_DBT_ACCOUNT=$(gcloud secrets versions access latest --secret="CI_SNOWFLAKE_DBT_ACCOUNT" --project="dbt-package-testing-363917") +export CI_SNOWFLAKE_DBT_DATABASE=$(gcloud secrets versions access latest --secret="CI_SNOWFLAKE_DBT_DATABASE" --project="dbt-package-testing-363917") +export CI_SNOWFLAKE_DBT_PASS=$(gcloud secrets versions access latest --secret="CI_SNOWFLAKE_DBT_PASS" --project="dbt-package-testing-363917") +export CI_SNOWFLAKE_DBT_ROLE=$(gcloud secrets versions access latest --secret="CI_SNOWFLAKE_DBT_ROLE" --project="dbt-package-testing-363917") +export CI_SNOWFLAKE_DBT_USER=$(gcloud secrets versions access latest --secret="CI_SNOWFLAKE_DBT_USER" --project="dbt-package-testing-363917") +export CI_SNOWFLAKE_DBT_WAREHOUSE=$(gcloud secrets versions access latest --secret="CI_SNOWFLAKE_DBT_WAREHOUSE" --project="dbt-package-testing-363917") +export CI_DATABRICKS_DBT_HOST=$(gcloud secrets versions access latest --secret="CI_DATABRICKS_DBT_HOST" --project="dbt-package-testing-363917") +export CI_DATABRICKS_DBT_HTTP_PATH=$(gcloud secrets versions access latest --secret="CI_DATABRICKS_DBT_HTTP_PATH" --project="dbt-package-testing-363917") +export CI_DATABRICKS_DBT_TOKEN=$(gcloud secrets versions access latest --secret="CI_DATABRICKS_DBT_TOKEN" --project="dbt-package-testing-363917") \ No newline at end of file From 3f235600fa113c21167d40b1480e96d2ed00070e Mon Sep 17 00:00:00 2001 From: Sheri Nguyen Date: Mon, 17 Oct 2022 09:40:02 -0500 Subject: [PATCH 12/18] Update dbt adapter versions and dbt required versions --- dbt_project.yml | 2 +- integration_tests/requirements.txt | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/dbt_project.yml b/dbt_project.yml index f3c9ae1..5f9edc0 100644 --- a/dbt_project.yml +++ b/dbt_project.yml @@ -1,7 +1,7 @@ name: 'apple_search_ads' version: '0.2.0' config-version: 2 -require-dbt-version: [">=1.2.0", "<2.0.0"] +require-dbt-version: [">=1.3.0", "<2.0.0"] vars: apple_search_ads: organization: "{{ ref('stg_apple_search_ads__organization') }}" diff --git a/integration_tests/requirements.txt b/integration_tests/requirements.txt index 46e2da6..87ae0f9 100644 --- a/integration_tests/requirements.txt +++ b/integration_tests/requirements.txt @@ -1,7 +1,7 @@ -dbt-snowflake~=1.2.0 -dbt-bigquery~=1.2.0 -dbt-redshift~=1.2.0 -dbt-postgres~=1.2.0 -dbt-spark~=1.2.0 -dbt-spark[PyHive]~=1.2.0 -dbt-databricks~=1.2.0 \ No newline at end of file +dbt-snowflake>=1.3.0,<2.0.0 +dbt-bigquery>=1.3.0,<2.0.0 +dbt-redshift>=1.3.0,<2.0.0 +dbt-postgres>=1.3.0,<2.0.0 +dbt-spark>=1.3.0,<2.0.0 +dbt-spark[PyHive]>=1.3.0,<2.0.0 +dbt-databricks>=1.3.0,<2.0.0 \ No newline at end of file From d60a0d575fe3cd0601328ff553aaa1570e942445 Mon Sep 17 00:00:00 2001 From: Jamie Rodriguez <65564846+fivetran-jamie@users.noreply.github.com> Date: Mon, 24 Oct 2022 15:14:20 -0700 Subject: [PATCH 13/18] updates --- .buildkite/scripts/run_models.sh | 2 +- CHANGELOG.md | 39 ++++++++++++++++++++++++ README.md | 10 +++--- integration_tests/ci/sample.profiles.yml | 10 +++--- integration_tests/dbt_project.yml | 4 +-- packages.yml | 8 +++-- 6 files changed, 58 insertions(+), 15 deletions(-) diff --git a/.buildkite/scripts/run_models.sh b/.buildkite/scripts/run_models.sh index a18ae39..9e4a115 100644 --- a/.buildkite/scripts/run_models.sh +++ b/.buildkite/scripts/run_models.sh @@ -18,6 +18,6 @@ dbt seed --target "$db" --full-refresh dbt run --target "$db" --full-refresh dbt test --target "$db" ## UPDATE FOR VARS HERE, IF NO VARS, PLEASE REMOVE -dbt run --vars '{apple_search_ads__using_search_terms: True}' --target "$db" --full-refresh +dbt run --vars '{apple_search_ads__using_search_terms: False}' --target "$db" --full-refresh dbt test --target "$db" ### END VARS CHUNK, REMOVE IF NOT USING \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index f118780..9a9dcf6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,42 @@ +# dbt_apple_search_ads v0.2.0 + +## 🚨 Breaking Changes 🚨: +[PR #14](https://github.com/fivetran/dbt_apple_search_ads/pull/14) includes the following breaking changes: +- Dispatch update for dbt-utils to dbt-core cross-db macros migration. Specifically `{{ dbt_utils. }}` have been updated to `{{ dbt. }}` for the below macros: + - `any_value` + - `bool_or` + - `cast_bool_to_text` + - `concat` + - `date_trunc` + - `dateadd` + - `datediff` + - `escape_single_quotes` + - `except` + - `hash` + - `intersect` + - `last_day` + - `length` + - `listagg` + - `position` + - `replace` + - `right` + - `safe_cast` + - `split_part` + - `string_literal` + - `type_bigint` + - `type_float` + - `type_int` + - `type_numeric` + - `type_string` + - `type_timestamp` + - `array_append` + - `array_concat` + - `array_construct` +- For `current_timestamp` and `current_timestamp_in_utc` macros, the dispatch AND the macro names have been updated to the below, respectively: + - `dbt.current_timestamp_backcompat` + - `dbt.current_timestamp_in_utc_backcompat` +- `packages.yml` has been updated to reflect new default `fivetran/fivetran_utils` version, previously `[">=0.3.0", "<0.4.0"]` now `[">=0.4.0", "<0.5.0"]`. + # dbt_apple_search_ads v0.1.0 ## Initial Release diff --git a/README.md b/README.md index 9638b87..867a2de 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ href="https://github.com/fivetran/dbt_apple_search_ads/blob/main/LICENSE"> - + @@ -51,7 +51,7 @@ Include the following apple_search_ads package version in your `packages.yml` fi ```yaml packages: - package: fivetran/apple_search_ads - version: [">=0.1.0", "<0.2.0"] + version: [">=0.2.0", "<0.3.0"] ``` ## Step 3: Define database and schema variables By default, this package runs using your destination and the `apple_search_ads` schema. If this is not where your Apple Search Ads data is (for example, if your Apple Search Ads schema is named `apple_search_ads_fivetran`), add the following configuration to your root `dbt_project.yml` file: @@ -141,13 +141,13 @@ This dbt package is dependent on the following dbt packages. Please be aware tha ```yml packages: - package: fivetran/apple_search_ads_source - version: [">=0.1.0", "<0.2.0"] + version: [">=0.2.0", "<0.3.0"] - package: fivetran/fivetran_utils - version: [">=0.3.0", "<0.4.0"] + version: [">=0.4.0", "<0.5.0"] - package: dbt-labs/dbt_utils - version: [">=0.8.0", "<0.9.0"] + version: [">=1.0.0", "<2.0.0"] ``` # 🙌 How is this package maintained and can I contribute? ## Package Maintenance diff --git a/integration_tests/ci/sample.profiles.yml b/integration_tests/ci/sample.profiles.yml index f524bd8..cbe6369 100644 --- a/integration_tests/ci/sample.profiles.yml +++ b/integration_tests/ci/sample.profiles.yml @@ -16,13 +16,13 @@ integration_tests: pass: "{{ env_var('CI_REDSHIFT_DBT_PASS') }}" dbname: "{{ env_var('CI_REDSHIFT_DBT_DBNAME') }}" port: 5439 - schema: + schema: apple_search_ads_integration_tests threads: 8 bigquery: type: bigquery method: service-account-json project: 'dbt-package-testing' - schema: + schema: apple_search_ads_integration_tests threads: 8 keyfile_json: "{{ env_var('GCLOUD_SERVICE_KEY') | as_native }}" snowflake: @@ -33,7 +33,7 @@ integration_tests: role: "{{ env_var('CI_SNOWFLAKE_DBT_ROLE') }}" database: "{{ env_var('CI_SNOWFLAKE_DBT_DATABASE') }}" warehouse: "{{ env_var('CI_SNOWFLAKE_DBT_WAREHOUSE') }}" - schema: + schema: apple_search_ads_integration_tests threads: 8 postgres: type: postgres @@ -42,13 +42,13 @@ integration_tests: pass: "{{ env_var('CI_POSTGRES_DBT_PASS') }}" dbname: "{{ env_var('CI_POSTGRES_DBT_DBNAME') }}" port: 5432 - schema: + schema: apple_search_ads_integration_tests threads: 8 databricks: catalog: null host: "{{ env_var('CI_DATABRICKS_DBT_HOST') }}" http_path: "{{ env_var('CI_DATABRICKS_DBT_HTTP_PATH') }}" - schema: + schema: apple_search_ads_integration_tests threads: 2 token: "{{ env_var('CI_DATABRICKS_DBT_TOKEN') }}" type: databricks \ No newline at end of file diff --git a/integration_tests/dbt_project.yml b/integration_tests/dbt_project.yml index 56b53ea..25841b3 100644 --- a/integration_tests/dbt_project.yml +++ b/integration_tests/dbt_project.yml @@ -1,7 +1,7 @@ config-version: 2 name: 'apple_search_ads_integration_tests' -version: '0.1.0' +version: '0.2.0' profile: 'integration_tests' @@ -31,4 +31,4 @@ seeds: dispatch: - macro_namespace: dbt_utils - search_order: ['!!!!!!! REPLACE 'spark' WITH 'spark','databricks' OR EQUIV !!!!!!!_utils', 'dbt_utils'] \ No newline at end of file + search_order: ['spark_utils', 'dbt_utils'] \ No newline at end of file diff --git a/packages.yml b/packages.yml index f78b6b3..3804b34 100644 --- a/packages.yml +++ b/packages.yml @@ -1,3 +1,7 @@ packages: -- package: fivetran/apple_search_ads_source - version: [">=0.1.0", "<0.2.0"] +# - package: fivetran/apple_search_ads_source +# version: [">=0.2.0", "<0.3.0"] + +- git: https://github.com/fivetran/dbt_apple_search_ads_source.git + revision: MagicBot/dbt-utils-cross-db-migration + warn-unpinned: false \ No newline at end of file From 3fb22d6f34bca23862cf39117def1adaa5d849fd Mon Sep 17 00:00:00 2001 From: Jamie Rodriguez <65564846+fivetran-jamie@users.noreply.github.com> Date: Tue, 25 Oct 2022 13:15:19 -0700 Subject: [PATCH 14/18] docs --- docs/catalog.json | 2 +- docs/index.html | 24 ++++++++++++------------ docs/manifest.json | 2 +- docs/run_results.json | 2 +- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/docs/catalog.json b/docs/catalog.json index f40aa5b..aa40424 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.0.4", "generated_at": "2022-08-26T21:15:22.556201Z", "invocation_id": "367dbfac-ed32-4d44-bb84-cf72665daa06", "env": {}}, "nodes": {"seed.apple_search_ads_integration_tests.ad_group_history_data": {"metadata": {"type": "BASE TABLE", "schema": "apple_search_ads_integration_tests", "name": "ad_group_history_data", "database": "postgres", "comment": null, "owner": "pguser"}, "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.apple_search_ads_integration_tests.ad_group_history_data"}, "seed.apple_search_ads_integration_tests.ad_group_report_data": {"metadata": {"type": "BASE TABLE", "schema": "apple_search_ads_integration_tests", "name": "ad_group_report_data", "database": "postgres", "comment": null, "owner": "pguser"}, "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}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.apple_search_ads_integration_tests.ad_group_report_data"}, "seed.apple_search_ads_integration_tests.ad_history_data": {"metadata": {"type": "BASE TABLE", "schema": "apple_search_ads_integration_tests", "name": "ad_history_data", "database": "postgres", "comment": null, "owner": "pguser"}, "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.apple_search_ads_integration_tests.ad_history_data"}, "seed.apple_search_ads_integration_tests.ad_report_data": {"metadata": {"type": "BASE TABLE", "schema": "apple_search_ads_integration_tests", "name": "ad_report_data", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"date": {"type": "date", "index": 1, "name": "date", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "campaign_id": {"type": "integer", "index": 3, "name": "campaign_id", "comment": null}, "ad_group_id": {"type": "integer", "index": 4, "name": "ad_group_id", "comment": null}, "ad_id": {"type": "integer", "index": 5, "name": "ad_id", "comment": null}, "impressions": {"type": "integer", "index": 6, "name": "impressions", "comment": null}, "local_spend_amount": {"type": "double precision", "index": 7, "name": "local_spend_amount", "comment": null}, "local_spend_currency": {"type": "text", "index": 8, "name": "local_spend_currency", "comment": null}, "new_downloads": {"type": "integer", "index": 9, "name": "new_downloads", "comment": null}, "redownloads": {"type": "integer", "index": 10, "name": "redownloads", "comment": null}, "taps": {"type": "integer", "index": 11, "name": "taps", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.apple_search_ads_integration_tests.ad_report_data"}, "seed.apple_search_ads_integration_tests.campaign_history_data": {"metadata": {"type": "BASE TABLE", "schema": "apple_search_ads_integration_tests", "name": "campaign_history_data", "database": "postgres", "comment": null, "owner": "pguser"}, "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.apple_search_ads_integration_tests.campaign_history_data"}, "seed.apple_search_ads_integration_tests.campaign_report_data": {"metadata": {"type": "BASE TABLE", "schema": "apple_search_ads_integration_tests", "name": "campaign_report_data", "database": "postgres", "comment": null, "owner": "pguser"}, "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}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.apple_search_ads_integration_tests.campaign_report_data"}, "seed.apple_search_ads_integration_tests.keyword_history_data": {"metadata": {"type": "BASE TABLE", "schema": "apple_search_ads_integration_tests", "name": "keyword_history_data", "database": "postgres", "comment": null, "owner": "pguser"}, "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.apple_search_ads_integration_tests.keyword_history_data"}, "seed.apple_search_ads_integration_tests.keyword_report_data": {"metadata": {"type": "BASE TABLE", "schema": "apple_search_ads_integration_tests", "name": "keyword_report_data", "database": "postgres", "comment": null, "owner": "pguser"}, "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}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.apple_search_ads_integration_tests.keyword_report_data"}, "seed.apple_search_ads_integration_tests.organization_data": {"metadata": {"type": "BASE TABLE", "schema": "apple_search_ads_integration_tests", "name": "organization_data", "database": "postgres", "comment": null, "owner": "pguser"}, "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.apple_search_ads_integration_tests.organization_data"}, "seed.apple_search_ads_integration_tests.search_term_report_data": {"metadata": {"type": "BASE TABLE", "schema": "apple_search_ads_integration_tests", "name": "search_term_report_data", "database": "postgres", "comment": null, "owner": "pguser"}, "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}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.apple_search_ads_integration_tests.search_term_report_data"}, "model.apple_search_ads.apple_search_ads__ad_group_report": {"metadata": {"type": "BASE TABLE", "schema": "apple_search_ads_integration_tests_apple_search_ads", "name": "apple_search_ads__ad_group_report", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"date_day": {"type": "date", "index": 1, "name": "date_day", "comment": null}, "organization_id": {"type": "integer", "index": 2, "name": "organization_id", "comment": null}, "organization_name": {"type": "text", "index": 3, "name": "organization_name", "comment": null}, "campaign_id": {"type": "integer", "index": 4, "name": "campaign_id", "comment": null}, "campaign_name": {"type": "text", "index": 5, "name": "campaign_name", "comment": null}, "ad_group_id": {"type": "integer", "index": 6, "name": "ad_group_id", "comment": null}, "ad_group_name": {"type": "text", "index": 7, "name": "ad_group_name", "comment": null}, "currency": {"type": "text", "index": 8, "name": "currency", "comment": null}, "ad_group_status": {"type": "text", "index": 9, "name": "ad_group_status", "comment": null}, "start_at": {"type": "timestamp without time zone", "index": 10, "name": "start_at", "comment": null}, "end_at": {"type": "timestamp without time zone", "index": 11, "name": "end_at", "comment": null}, "taps": {"type": "bigint", "index": 12, "name": "taps", "comment": null}, "new_downloads": {"type": "bigint", "index": 13, "name": "new_downloads", "comment": null}, "redownloads": {"type": "bigint", "index": 14, "name": "redownloads", "comment": null}, "total_downloads": {"type": "bigint", "index": 15, "name": "total_downloads", "comment": null}, "impressions": {"type": "bigint", "index": 16, "name": "impressions", "comment": null}, "spend": {"type": "double precision", "index": 17, "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.apple_search_ads.apple_search_ads__ad_group_report"}, "model.apple_search_ads.apple_search_ads__ad_report": {"metadata": {"type": "BASE TABLE", "schema": "apple_search_ads_integration_tests_apple_search_ads", "name": "apple_search_ads__ad_report", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"date_day": {"type": "date", "index": 1, "name": "date_day", "comment": null}, "organization_id": {"type": "integer", "index": 2, "name": "organization_id", "comment": null}, "organization_name": {"type": "text", "index": 3, "name": "organization_name", "comment": null}, "campaign_id": {"type": "integer", "index": 4, "name": "campaign_id", "comment": null}, "campaign_name": {"type": "text", "index": 5, "name": "campaign_name", "comment": null}, "ad_group_id": {"type": "integer", "index": 6, "name": "ad_group_id", "comment": null}, "ad_group_name": {"type": "text", "index": 7, "name": "ad_group_name", "comment": null}, "ad_id": {"type": "integer", "index": 8, "name": "ad_id", "comment": null}, "ad_name": {"type": "text", "index": 9, "name": "ad_name", "comment": null}, "currency": {"type": "text", "index": 10, "name": "currency", "comment": null}, "ad_status": {"type": "text", "index": 11, "name": "ad_status", "comment": null}, "taps": {"type": "bigint", "index": 12, "name": "taps", "comment": null}, "new_downloads": {"type": "bigint", "index": 13, "name": "new_downloads", "comment": null}, "redownloads": {"type": "bigint", "index": 14, "name": "redownloads", "comment": null}, "total_downloads": {"type": "bigint", "index": 15, "name": "total_downloads", "comment": null}, "impressions": {"type": "bigint", "index": 16, "name": "impressions", "comment": null}, "spend": {"type": "double precision", "index": 17, "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.apple_search_ads.apple_search_ads__ad_report"}, "model.apple_search_ads.apple_search_ads__campaign_report": {"metadata": {"type": "BASE TABLE", "schema": "apple_search_ads_integration_tests_apple_search_ads", "name": "apple_search_ads__campaign_report", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"date_day": {"type": "date", "index": 1, "name": "date_day", "comment": null}, "organization_id": {"type": "integer", "index": 2, "name": "organization_id", "comment": null}, "organization_name": {"type": "text", "index": 3, "name": "organization_name", "comment": null}, "campaign_id": {"type": "integer", "index": 4, "name": "campaign_id", "comment": null}, "campaign_name": {"type": "text", "index": 5, "name": "campaign_name", "comment": null}, "currency": {"type": "text", "index": 6, "name": "currency", "comment": null}, "campaign_status": {"type": "text", "index": 7, "name": "campaign_status", "comment": null}, "start_at": {"type": "timestamp without time zone", "index": 8, "name": "start_at", "comment": null}, "end_at": {"type": "timestamp without time zone", "index": 9, "name": "end_at", "comment": null}, "taps": {"type": "bigint", "index": 10, "name": "taps", "comment": null}, "new_downloads": {"type": "bigint", "index": 11, "name": "new_downloads", "comment": null}, "redownloads": {"type": "bigint", "index": 12, "name": "redownloads", "comment": null}, "total_downloads": {"type": "bigint", "index": 13, "name": "total_downloads", "comment": null}, "impressions": {"type": "bigint", "index": 14, "name": "impressions", "comment": null}, "spend": {"type": "double precision", "index": 15, "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.apple_search_ads.apple_search_ads__campaign_report"}, "model.apple_search_ads.apple_search_ads__keyword_report": {"metadata": {"type": "BASE TABLE", "schema": "apple_search_ads_integration_tests_apple_search_ads", "name": "apple_search_ads__keyword_report", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"date_day": {"type": "date", "index": 1, "name": "date_day", "comment": null}, "organization_id": {"type": "integer", "index": 2, "name": "organization_id", "comment": null}, "organization_name": {"type": "text", "index": 3, "name": "organization_name", "comment": null}, "campaign_id": {"type": "integer", "index": 4, "name": "campaign_id", "comment": null}, "campaign_name": {"type": "text", "index": 5, "name": "campaign_name", "comment": null}, "ad_group_id": {"type": "integer", "index": 6, "name": "ad_group_id", "comment": null}, "ad_group_name": {"type": "text", "index": 7, "name": "ad_group_name", "comment": null}, "keyword_id": {"type": "integer", "index": 8, "name": "keyword_id", "comment": null}, "keyword_text": {"type": "text", "index": 9, "name": "keyword_text", "comment": null}, "match_type": {"type": "text", "index": 10, "name": "match_type", "comment": null}, "currency": {"type": "text", "index": 11, "name": "currency", "comment": null}, "keyword_status": {"type": "text", "index": 12, "name": "keyword_status", "comment": null}, "taps": {"type": "bigint", "index": 13, "name": "taps", "comment": null}, "new_downloads": {"type": "bigint", "index": 14, "name": "new_downloads", "comment": null}, "redownloads": {"type": "bigint", "index": 15, "name": "redownloads", "comment": null}, "total_downloads": {"type": "bigint", "index": 16, "name": "total_downloads", "comment": null}, "impressions": {"type": "bigint", "index": 17, "name": "impressions", "comment": null}, "spend": {"type": "double precision", "index": 18, "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.apple_search_ads.apple_search_ads__keyword_report"}, "model.apple_search_ads.apple_search_ads__organization_report": {"metadata": {"type": "BASE TABLE", "schema": "apple_search_ads_integration_tests_apple_search_ads", "name": "apple_search_ads__organization_report", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"date_day": {"type": "date", "index": 1, "name": "date_day", "comment": null}, "organization_id": {"type": "integer", "index": 2, "name": "organization_id", "comment": null}, "organization_name": {"type": "text", "index": 3, "name": "organization_name", "comment": null}, "currency": {"type": "text", "index": 4, "name": "currency", "comment": null}, "taps": {"type": "bigint", "index": 5, "name": "taps", "comment": null}, "new_downloads": {"type": "bigint", "index": 6, "name": "new_downloads", "comment": null}, "redownloads": {"type": "bigint", "index": 7, "name": "redownloads", "comment": null}, "total_downloads": {"type": "bigint", "index": 8, "name": "total_downloads", "comment": null}, "impressions": {"type": "bigint", "index": 9, "name": "impressions", "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.apple_search_ads.apple_search_ads__organization_report"}, "model.apple_search_ads.apple_search_ads__search_term_report": {"metadata": {"type": "BASE TABLE", "schema": "apple_search_ads_integration_tests_apple_search_ads", "name": "apple_search_ads__search_term_report", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"date_day": {"type": "date", "index": 1, "name": "date_day", "comment": null}, "organization_id": {"type": "integer", "index": 2, "name": "organization_id", "comment": null}, "organization_name": {"type": "text", "index": 3, "name": "organization_name", "comment": null}, "campaign_id": {"type": "integer", "index": 4, "name": "campaign_id", "comment": null}, "campaign_name": {"type": "text", "index": 5, "name": "campaign_name", "comment": null}, "ad_group_id": {"type": "integer", "index": 6, "name": "ad_group_id", "comment": null}, "ad_group_name": {"type": "text", "index": 7, "name": "ad_group_name", "comment": null}, "keyword_id": {"type": "integer", "index": 8, "name": "keyword_id", "comment": null}, "keyword_text": {"type": "text", "index": 9, "name": "keyword_text", "comment": null}, "search_term_text": {"type": "text", "index": 10, "name": "search_term_text", "comment": null}, "match_type": {"type": "text", "index": 11, "name": "match_type", "comment": null}, "currency": {"type": "text", "index": 12, "name": "currency", "comment": null}, "taps": {"type": "bigint", "index": 13, "name": "taps", "comment": null}, "new_downloads": {"type": "bigint", "index": 14, "name": "new_downloads", "comment": null}, "redownloads": {"type": "bigint", "index": 15, "name": "redownloads", "comment": null}, "total_downloads": {"type": "bigint", "index": 16, "name": "total_downloads", "comment": null}, "impressions": {"type": "bigint", "index": 17, "name": "impressions", "comment": null}, "spend": {"type": "double precision", "index": 18, "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.apple_search_ads.apple_search_ads__search_term_report"}, "model.apple_search_ads_source.stg_apple_search_ads__ad_group_history": {"metadata": {"type": "BASE TABLE", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "name": "stg_apple_search_ads__ad_group_history", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"modified_at": {"type": "timestamp without time zone", "index": 1, "name": "modified_at", "comment": null}, "organization_id": {"type": "integer", "index": 2, "name": "organization_id", "comment": null}, "campaign_id": {"type": "integer", "index": 3, "name": "campaign_id", "comment": null}, "ad_group_name": {"type": "text", "index": 4, "name": "ad_group_name", "comment": null}, "ad_group_id": {"type": "integer", "index": 5, "name": "ad_group_id", "comment": null}, "ad_group_status": {"type": "text", "index": 6, "name": "ad_group_status", "comment": null}, "start_at": {"type": "timestamp without time zone", "index": 7, "name": "start_at", "comment": null}, "end_at": {"type": "timestamp without time zone", "index": 8, "name": "end_at", "comment": null}, "is_most_recent_record": {"type": "boolean", "index": 9, "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_source.stg_apple_search_ads__ad_group_history"}, "model.apple_search_ads_source.stg_apple_search_ads__ad_group_history_tmp": {"metadata": {"type": "VIEW", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "name": "stg_apple_search_ads__ad_group_history_tmp", "database": "postgres", "comment": null, "owner": "pguser"}, "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_source.stg_apple_search_ads__ad_group_history_tmp"}, "model.apple_search_ads_source.stg_apple_search_ads__ad_group_report": {"metadata": {"type": "BASE TABLE", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "name": "stg_apple_search_ads__ad_group_report", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"date_day": {"type": "date", "index": 1, "name": "date_day", "comment": null}, "ad_group_id": {"type": "integer", "index": 2, "name": "ad_group_id", "comment": null}, "impressions": {"type": "integer", "index": 3, "name": "impressions", "comment": null}, "spend": {"type": "double precision", "index": 4, "name": "spend", "comment": null}, "currency": {"type": "text", "index": 5, "name": "currency", "comment": null}, "new_downloads": {"type": "integer", "index": 6, "name": "new_downloads", "comment": null}, "redownloads": {"type": "integer", "index": 7, "name": "redownloads", "comment": null}, "taps": {"type": "integer", "index": 8, "name": "taps", "comment": null}}, "stats": {"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_source.stg_apple_search_ads__ad_group_report"}, "model.apple_search_ads_source.stg_apple_search_ads__ad_group_report_tmp": {"metadata": {"type": "VIEW", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "name": "stg_apple_search_ads__ad_group_report_tmp", "database": "postgres", "comment": null, "owner": "pguser"}, "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}}, "stats": {"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_source.stg_apple_search_ads__ad_group_report_tmp"}, "model.apple_search_ads_source.stg_apple_search_ads__ad_history": {"metadata": {"type": "BASE TABLE", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "name": "stg_apple_search_ads__ad_history", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"created_at": {"type": "timestamp without time zone", "index": 1, "name": "created_at", "comment": null}, "modified_at": {"type": "timestamp without time zone", "index": 2, "name": "modified_at", "comment": null}, "organization_id": {"type": "integer", "index": 3, "name": "organization_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}, "ad_name": {"type": "text", "index": 6, "name": "ad_name", "comment": null}, "ad_id": {"type": "integer", "index": 7, "name": "ad_id", "comment": null}, "ad_status": {"type": "text", "index": 8, "name": "ad_status", "comment": null}, "is_most_recent_record": {"type": "boolean", "index": 9, "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_source.stg_apple_search_ads__ad_history"}, "model.apple_search_ads_source.stg_apple_search_ads__ad_history_tmp": {"metadata": {"type": "VIEW", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "name": "stg_apple_search_ads__ad_history_tmp", "database": "postgres", "comment": null, "owner": "pguser"}, "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_source.stg_apple_search_ads__ad_history_tmp"}, "model.apple_search_ads_source.stg_apple_search_ads__ad_report": {"metadata": {"type": "BASE TABLE", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "name": "stg_apple_search_ads__ad_report", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"date_day": {"type": "date", "index": 1, "name": "date_day", "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}, "spend": {"type": "double precision", "index": 6, "name": "spend", "comment": null}, "currency": {"type": "text", "index": 7, "name": "currency", "comment": null}, "new_downloads": {"type": "integer", "index": 8, "name": "new_downloads", "comment": null}, "redownloads": {"type": "integer", "index": 9, "name": "redownloads", "comment": null}, "taps": {"type": "integer", "index": 10, "name": "taps", "comment": null}}, "stats": {"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_source.stg_apple_search_ads__ad_report"}, "model.apple_search_ads_source.stg_apple_search_ads__ad_report_tmp": {"metadata": {"type": "VIEW", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "name": "stg_apple_search_ads__ad_report_tmp", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"date": {"type": "date", "index": 1, "name": "date", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "campaign_id": {"type": "integer", "index": 3, "name": "campaign_id", "comment": null}, "ad_group_id": {"type": "integer", "index": 4, "name": "ad_group_id", "comment": null}, "ad_id": {"type": "integer", "index": 5, "name": "ad_id", "comment": null}, "impressions": {"type": "integer", "index": 6, "name": "impressions", "comment": null}, "local_spend_amount": {"type": "double precision", "index": 7, "name": "local_spend_amount", "comment": null}, "local_spend_currency": {"type": "text", "index": 8, "name": "local_spend_currency", "comment": null}, "new_downloads": {"type": "integer", "index": 9, "name": "new_downloads", "comment": null}, "redownloads": {"type": "integer", "index": 10, "name": "redownloads", "comment": null}, "taps": {"type": "integer", "index": 11, "name": "taps", "comment": null}}, "stats": {"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_source.stg_apple_search_ads__ad_report_tmp"}, "model.apple_search_ads_source.stg_apple_search_ads__campaign_history": {"metadata": {"type": "BASE TABLE", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "name": "stg_apple_search_ads__campaign_history", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"modified_at": {"type": "timestamp without time zone", "index": 1, "name": "modified_at", "comment": null}, "organization_id": {"type": "integer", "index": 2, "name": "organization_id", "comment": null}, "campaign_name": {"type": "text", "index": 3, "name": "campaign_name", "comment": null}, "campaign_id": {"type": "integer", "index": 4, "name": "campaign_id", "comment": null}, "campaign_status": {"type": "text", "index": 5, "name": "campaign_status", "comment": null}, "start_at": {"type": "timestamp without time zone", "index": 6, "name": "start_at", "comment": null}, "end_at": {"type": "timestamp without time zone", "index": 7, "name": "end_at", "comment": null}, "is_most_recent_record": {"type": "boolean", "index": 8, "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_source.stg_apple_search_ads__campaign_history"}, "model.apple_search_ads_source.stg_apple_search_ads__campaign_history_tmp": {"metadata": {"type": "VIEW", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "name": "stg_apple_search_ads__campaign_history_tmp", "database": "postgres", "comment": null, "owner": "pguser"}, "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_source.stg_apple_search_ads__campaign_history_tmp"}, "model.apple_search_ads_source.stg_apple_search_ads__campaign_report": {"metadata": {"type": "BASE TABLE", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "name": "stg_apple_search_ads__campaign_report", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"date_day": {"type": "date", "index": 1, "name": "date_day", "comment": null}, "campaign_id": {"type": "integer", "index": 2, "name": "campaign_id", "comment": null}, "impressions": {"type": "integer", "index": 3, "name": "impressions", "comment": null}, "spend": {"type": "double precision", "index": 4, "name": "spend", "comment": null}, "currency": {"type": "text", "index": 5, "name": "currency", "comment": null}, "new_downloads": {"type": "integer", "index": 6, "name": "new_downloads", "comment": null}, "redownloads": {"type": "integer", "index": 7, "name": "redownloads", "comment": null}, "taps": {"type": "integer", "index": 8, "name": "taps", "comment": null}}, "stats": {"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_source.stg_apple_search_ads__campaign_report"}, "model.apple_search_ads_source.stg_apple_search_ads__campaign_report_tmp": {"metadata": {"type": "VIEW", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "name": "stg_apple_search_ads__campaign_report_tmp", "database": "postgres", "comment": null, "owner": "pguser"}, "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}}, "stats": {"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_source.stg_apple_search_ads__campaign_report_tmp"}, "model.apple_search_ads_source.stg_apple_search_ads__keyword_history": {"metadata": {"type": "BASE TABLE", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "name": "stg_apple_search_ads__keyword_history", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"modified_at": {"type": "timestamp without time zone", "index": 1, "name": "modified_at", "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}, "keyword_id": {"type": "integer", "index": 4, "name": "keyword_id", "comment": null}, "bid_amount": {"type": "double precision", "index": 5, "name": "bid_amount", "comment": null}, "bid_currency": {"type": "text", "index": 6, "name": "bid_currency", "comment": null}, "match_type": {"type": "text", "index": 7, "name": "match_type", "comment": null}, "keyword_status": {"type": "text", "index": 8, "name": "keyword_status", "comment": null}, "keyword_text": {"type": "text", "index": 9, "name": "keyword_text", "comment": null}, "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_source.stg_apple_search_ads__keyword_history"}, "model.apple_search_ads_source.stg_apple_search_ads__keyword_history_tmp": {"metadata": {"type": "VIEW", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "name": "stg_apple_search_ads__keyword_history_tmp", "database": "postgres", "comment": null, "owner": "pguser"}, "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_source.stg_apple_search_ads__keyword_history_tmp"}, "model.apple_search_ads_source.stg_apple_search_ads__keyword_report": {"metadata": {"type": "BASE TABLE", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "name": "stg_apple_search_ads__keyword_report", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"date_day": {"type": "date", "index": 1, "name": "date_day", "comment": null}, "keyword_id": {"type": "integer", "index": 2, "name": "keyword_id", "comment": null}, "impressions": {"type": "integer", "index": 3, "name": "impressions", "comment": null}, "spend": {"type": "double precision", "index": 4, "name": "spend", "comment": null}, "currency": {"type": "text", "index": 5, "name": "currency", "comment": null}, "new_downloads": {"type": "integer", "index": 6, "name": "new_downloads", "comment": null}, "redownloads": {"type": "integer", "index": 7, "name": "redownloads", "comment": null}, "taps": {"type": "integer", "index": 8, "name": "taps", "comment": null}}, "stats": {"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_source.stg_apple_search_ads__keyword_report"}, "model.apple_search_ads_source.stg_apple_search_ads__keyword_report_tmp": {"metadata": {"type": "VIEW", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "name": "stg_apple_search_ads__keyword_report_tmp", "database": "postgres", "comment": null, "owner": "pguser"}, "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}}, "stats": {"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_source.stg_apple_search_ads__keyword_report_tmp"}, "model.apple_search_ads_source.stg_apple_search_ads__organization": {"metadata": {"type": "BASE TABLE", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "name": "stg_apple_search_ads__organization", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"organization_id": {"type": "integer", "index": 1, "name": "organization_id", "comment": null}, "currency": {"type": "text", "index": 2, "name": "currency", "comment": null}, "payment_model": {"type": "text", "index": 3, "name": "payment_model", "comment": null}, "organization_name": {"type": "text", "index": 4, "name": "organization_name", "comment": null}, "time_zone": {"type": "text", "index": 5, "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_source.stg_apple_search_ads__organization"}, "model.apple_search_ads_source.stg_apple_search_ads__organization_tmp": {"metadata": {"type": "VIEW", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "name": "stg_apple_search_ads__organization_tmp", "database": "postgres", "comment": null, "owner": "pguser"}, "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_source.stg_apple_search_ads__organization_tmp"}, "model.apple_search_ads_source.stg_apple_search_ads__search_term_report": {"metadata": {"type": "BASE TABLE", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "name": "stg_apple_search_ads__search_term_report", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"date_day": {"type": "date", "index": 1, "name": "date_day", "comment": null}, "_fivetran_id": {"type": "text", "index": 2, "name": "_fivetran_id", "comment": null}, "campaign_id": {"type": "integer", "index": 3, "name": "campaign_id", "comment": null}, "ad_group_id": {"type": "integer", "index": 4, "name": "ad_group_id", "comment": null}, "ad_group_name": {"type": "text", "index": 5, "name": "ad_group_name", "comment": null}, "bid_amount": {"type": "double precision", "index": 6, "name": "bid_amount", "comment": null}, "bid_currency": {"type": "text", "index": 7, "name": "bid_currency", "comment": null}, "keyword_text": {"type": "text", "index": 8, "name": "keyword_text", "comment": null}, "keyword_display_status": {"type": "text", "index": 9, "name": "keyword_display_status", "comment": null}, "keyword_id": {"type": "integer", "index": 10, "name": "keyword_id", "comment": null}, "spend": {"type": "double precision", "index": 11, "name": "spend", "comment": null}, "currency": {"type": "text", "index": 12, "name": "currency", "comment": null}, "match_type": {"type": "text", "index": 13, "name": "match_type", "comment": null}, "search_term_source": {"type": "text", "index": 14, "name": "search_term_source", "comment": null}, "search_term_text": {"type": "text", "index": 15, "name": "search_term_text", "comment": null}, "impressions": {"type": "integer", "index": 16, "name": "impressions", "comment": null}, "taps": {"type": "integer", "index": 17, "name": "taps", "comment": null}, "new_downloads": {"type": "integer", "index": 18, "name": "new_downloads", "comment": null}, "redownloads": {"type": "integer", "index": 19, "name": "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_source.stg_apple_search_ads__search_term_report"}, "model.apple_search_ads_source.stg_apple_search_ads__search_term_report_tmp": {"metadata": {"type": "VIEW", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "name": "stg_apple_search_ads__search_term_report_tmp", "database": "postgres", "comment": null, "owner": "pguser"}, "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}}, "stats": {"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_source.stg_apple_search_ads__search_term_report_tmp"}}, "sources": {"source.apple_search_ads_source.apple_search_ads.ad_group_history": {"metadata": {"type": "BASE TABLE", "schema": "apple_search_ads_integration_tests", "name": "ad_group_history_data", "database": "postgres", "comment": null, "owner": "pguser"}, "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_source.apple_search_ads.ad_group_history"}, "source.apple_search_ads_source.apple_search_ads.ad_group_report": {"metadata": {"type": "BASE TABLE", "schema": "apple_search_ads_integration_tests", "name": "ad_group_report_data", "database": "postgres", "comment": null, "owner": "pguser"}, "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}}, "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_source.apple_search_ads.ad_group_report"}, "source.apple_search_ads_source.apple_search_ads.ad_history": {"metadata": {"type": "BASE TABLE", "schema": "apple_search_ads_integration_tests", "name": "ad_history_data", "database": "postgres", "comment": null, "owner": "pguser"}, "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_source.apple_search_ads.ad_history"}, "source.apple_search_ads_source.apple_search_ads.ad_level_report": {"metadata": {"type": "BASE TABLE", "schema": "apple_search_ads_integration_tests", "name": "ad_report_data", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"date": {"type": "date", "index": 1, "name": "date", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "campaign_id": {"type": "integer", "index": 3, "name": "campaign_id", "comment": null}, "ad_group_id": {"type": "integer", "index": 4, "name": "ad_group_id", "comment": null}, "ad_id": {"type": "integer", "index": 5, "name": "ad_id", "comment": null}, "impressions": {"type": "integer", "index": 6, "name": "impressions", "comment": null}, "local_spend_amount": {"type": "double precision", "index": 7, "name": "local_spend_amount", "comment": null}, "local_spend_currency": {"type": "text", "index": 8, "name": "local_spend_currency", "comment": null}, "new_downloads": {"type": "integer", "index": 9, "name": "new_downloads", "comment": null}, "redownloads": {"type": "integer", "index": 10, "name": "redownloads", "comment": null}, "taps": {"type": "integer", "index": 11, "name": "taps", "comment": null}}, "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_source.apple_search_ads.ad_level_report"}, "source.apple_search_ads_source.apple_search_ads.campaign_history": {"metadata": {"type": "BASE TABLE", "schema": "apple_search_ads_integration_tests", "name": "campaign_history_data", "database": "postgres", "comment": null, "owner": "pguser"}, "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_source.apple_search_ads.campaign_history"}, "source.apple_search_ads_source.apple_search_ads.campaign_report": {"metadata": {"type": "BASE TABLE", "schema": "apple_search_ads_integration_tests", "name": "campaign_report_data", "database": "postgres", "comment": null, "owner": "pguser"}, "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}}, "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_source.apple_search_ads.campaign_report"}, "source.apple_search_ads_source.apple_search_ads.keyword_history": {"metadata": {"type": "BASE TABLE", "schema": "apple_search_ads_integration_tests", "name": "keyword_history_data", "database": "postgres", "comment": null, "owner": "pguser"}, "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_source.apple_search_ads.keyword_history"}, "source.apple_search_ads_source.apple_search_ads.keyword_report": {"metadata": {"type": "BASE TABLE", "schema": "apple_search_ads_integration_tests", "name": "keyword_report_data", "database": "postgres", "comment": null, "owner": "pguser"}, "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}}, "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_source.apple_search_ads.keyword_report"}, "source.apple_search_ads_source.apple_search_ads.organization": {"metadata": {"type": "BASE TABLE", "schema": "apple_search_ads_integration_tests", "name": "organization_data", "database": "postgres", "comment": null, "owner": "pguser"}, "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_source.apple_search_ads.organization"}, "source.apple_search_ads_source.apple_search_ads.search_term_report": {"metadata": {"type": "BASE TABLE", "schema": "apple_search_ads_integration_tests", "name": "search_term_report_data", "database": "postgres", "comment": null, "owner": "pguser"}, "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}}, "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_source.apple_search_ads.search_term_report"}}, "errors": null} \ No newline at end of file +{"metadata": {"dbt_schema_version": "https://schemas.getdbt.com/dbt/catalog/v1.json", "dbt_version": "1.3.0", "generated_at": "2022-10-25T20:13:58.301143Z", "invocation_id": "2191920f-7f18-410e-bf49-1ac3da176caa", "env": {}}, "nodes": {"model.apple_search_ads.apple_search_ads__ad_report": {"metadata": {"type": "table", "schema": "apple_search_ads_integration_tests_apple_search_ads", "name": "apple_search_ads__ad_report", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"date_day": {"type": "DATE", "index": 1, "name": "date_day", "comment": null}, "organization_id": {"type": "INT64", "index": 2, "name": "organization_id", "comment": null}, "organization_name": {"type": "STRING", "index": 3, "name": "organization_name", "comment": null}, "campaign_id": {"type": "INT64", "index": 4, "name": "campaign_id", "comment": null}, "campaign_name": {"type": "STRING", "index": 5, "name": "campaign_name", "comment": null}, "ad_group_id": {"type": "INT64", "index": 6, "name": "ad_group_id", "comment": null}, "ad_group_name": {"type": "STRING", "index": 7, "name": "ad_group_name", "comment": null}, "ad_id": {"type": "INT64", "index": 8, "name": "ad_id", "comment": null}, "ad_name": {"type": "STRING", "index": 9, "name": "ad_name", "comment": null}, "currency": {"type": "STRING", "index": 10, "name": "currency", "comment": null}, "ad_status": {"type": "STRING", "index": 11, "name": "ad_status", "comment": null}, "taps": {"type": "INT64", "index": 12, "name": "taps", "comment": null}, "new_downloads": {"type": "INT64", "index": 13, "name": "new_downloads", "comment": null}, "redownloads": {"type": "INT64", "index": 14, "name": "redownloads", "comment": null}, "total_downloads": {"type": "INT64", "index": 15, "name": "total_downloads", "comment": null}, "impressions": {"type": "INT64", "index": 16, "name": "impressions", "comment": null}, "spend": {"type": "FLOAT64", "index": 17, "name": "spend", "comment": null}}, "stats": {"num_rows": {"id": "num_rows", "label": "# Rows", "value": 0.0, "include": true, "description": "Approximate count of rows in this table"}, "num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 0.0, "include": true, "description": "Approximate size of table as reported by BigQuery"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "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__search_term_report": {"metadata": {"type": "table", "schema": "apple_search_ads_integration_tests_apple_search_ads", "name": "apple_search_ads__search_term_report", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"date_day": {"type": "DATE", "index": 1, "name": "date_day", "comment": null}, "organization_id": {"type": "INT64", "index": 2, "name": "organization_id", "comment": null}, "organization_name": {"type": "STRING", "index": 3, "name": "organization_name", "comment": null}, "campaign_id": {"type": "INT64", "index": 4, "name": "campaign_id", "comment": null}, "campaign_name": {"type": "STRING", "index": 5, "name": "campaign_name", "comment": null}, "ad_group_id": {"type": "INT64", "index": 6, "name": "ad_group_id", "comment": null}, "ad_group_name": {"type": "STRING", "index": 7, "name": "ad_group_name", "comment": null}, "keyword_id": {"type": "INT64", "index": 8, "name": "keyword_id", "comment": null}, "keyword_text": {"type": "STRING", "index": 9, "name": "keyword_text", "comment": null}, "search_term_text": {"type": "STRING", "index": 10, "name": "search_term_text", "comment": null}, "match_type": {"type": "STRING", "index": 11, "name": "match_type", "comment": null}, "currency": {"type": "STRING", "index": 12, "name": "currency", "comment": null}, "taps": {"type": "INT64", "index": 13, "name": "taps", "comment": null}, "new_downloads": {"type": "INT64", "index": 14, "name": "new_downloads", "comment": null}, "redownloads": {"type": "INT64", "index": 15, "name": "redownloads", "comment": null}, "total_downloads": {"type": "INT64", "index": 16, "name": "total_downloads", "comment": null}, "impressions": {"type": "INT64", "index": 17, "name": "impressions", "comment": null}, "spend": {"type": "FLOAT64", "index": 18, "name": "spend", "comment": null}}, "stats": {"num_rows": {"id": "num_rows", "label": "# Rows", "value": 38.0, "include": true, "description": "Approximate count of rows in this table"}, "num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 5544.0, "include": true, "description": "Approximate size of table as reported by BigQuery"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.apple_search_ads.apple_search_ads__search_term_report"}, "model.apple_search_ads.apple_search_ads__organization_report": {"metadata": {"type": "table", "schema": "apple_search_ads_integration_tests_apple_search_ads", "name": "apple_search_ads__organization_report", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"date_day": {"type": "DATE", "index": 1, "name": "date_day", "comment": null}, "organization_id": {"type": "INT64", "index": 2, "name": "organization_id", "comment": null}, "organization_name": {"type": "STRING", "index": 3, "name": "organization_name", "comment": null}, "currency": {"type": "STRING", "index": 4, "name": "currency", "comment": null}, "taps": {"type": "INT64", "index": 5, "name": "taps", "comment": null}, "new_downloads": {"type": "INT64", "index": 6, "name": "new_downloads", "comment": null}, "redownloads": {"type": "INT64", "index": 7, "name": "redownloads", "comment": null}, "total_downloads": {"type": "INT64", "index": 8, "name": "total_downloads", "comment": null}, "impressions": {"type": "INT64", "index": 9, "name": "impressions", "comment": null}, "spend": {"type": "FLOAT64", "index": 10, "name": "spend", "comment": null}}, "stats": {"num_rows": {"id": "num_rows", "label": "# Rows", "value": 12.0, "include": true, "description": "Approximate count of rows in this table"}, "num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 984.0, "include": true, "description": "Approximate size of table as reported by BigQuery"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "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__keyword_report": {"metadata": {"type": "table", "schema": "apple_search_ads_integration_tests_apple_search_ads", "name": "apple_search_ads__keyword_report", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"date_day": {"type": "DATE", "index": 1, "name": "date_day", "comment": null}, "organization_id": {"type": "INT64", "index": 2, "name": "organization_id", "comment": null}, "organization_name": {"type": "STRING", "index": 3, "name": "organization_name", "comment": null}, "campaign_id": {"type": "INT64", "index": 4, "name": "campaign_id", "comment": null}, "campaign_name": {"type": "STRING", "index": 5, "name": "campaign_name", "comment": null}, "ad_group_id": {"type": "INT64", "index": 6, "name": "ad_group_id", "comment": null}, "ad_group_name": {"type": "STRING", "index": 7, "name": "ad_group_name", "comment": null}, "keyword_id": {"type": "INT64", "index": 8, "name": "keyword_id", "comment": null}, "keyword_text": {"type": "STRING", "index": 9, "name": "keyword_text", "comment": null}, "match_type": {"type": "STRING", "index": 10, "name": "match_type", "comment": null}, "currency": {"type": "STRING", "index": 11, "name": "currency", "comment": null}, "keyword_status": {"type": "STRING", "index": 12, "name": "keyword_status", "comment": null}, "taps": {"type": "INT64", "index": 13, "name": "taps", "comment": null}, "new_downloads": {"type": "INT64", "index": 14, "name": "new_downloads", "comment": null}, "redownloads": {"type": "INT64", "index": 15, "name": "redownloads", "comment": null}, "total_downloads": {"type": "INT64", "index": 16, "name": "total_downloads", "comment": null}, "impressions": {"type": "INT64", "index": 17, "name": "impressions", "comment": null}, "spend": {"type": "FLOAT64", "index": 18, "name": "spend", "comment": null}}, "stats": {"num_rows": {"id": "num_rows", "label": "# Rows", "value": 99.0, "include": true, "description": "Approximate count of rows in this table"}, "num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 15510.0, "include": true, "description": "Approximate size of table as reported by BigQuery"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "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__campaign_report": {"metadata": {"type": "table", "schema": "apple_search_ads_integration_tests_apple_search_ads", "name": "apple_search_ads__campaign_report", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"date_day": {"type": "DATE", "index": 1, "name": "date_day", "comment": null}, "organization_id": {"type": "INT64", "index": 2, "name": "organization_id", "comment": null}, "organization_name": {"type": "STRING", "index": 3, "name": "organization_name", "comment": null}, "campaign_id": {"type": "INT64", "index": 4, "name": "campaign_id", "comment": null}, "campaign_name": {"type": "STRING", "index": 5, "name": "campaign_name", "comment": null}, "currency": {"type": "STRING", "index": 6, "name": "currency", "comment": null}, "campaign_status": {"type": "STRING", "index": 7, "name": "campaign_status", "comment": null}, "start_at": {"type": "TIMESTAMP", "index": 8, "name": "start_at", "comment": null}, "end_at": {"type": "TIMESTAMP", "index": 9, "name": "end_at", "comment": null}, "taps": {"type": "INT64", "index": 10, "name": "taps", "comment": null}, "new_downloads": {"type": "INT64", "index": 11, "name": "new_downloads", "comment": null}, "redownloads": {"type": "INT64", "index": 12, "name": "redownloads", "comment": null}, "total_downloads": {"type": "INT64", "index": 13, "name": "total_downloads", "comment": null}, "impressions": {"type": "INT64", "index": 14, "name": "impressions", "comment": null}, "spend": {"type": "FLOAT64", "index": 15, "name": "spend", "comment": null}}, "stats": {"num_rows": {"id": "num_rows", "label": "# Rows", "value": 12.0, "include": true, "description": "Approximate count of rows in this table"}, "num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 1488.0, "include": true, "description": "Approximate size of table as reported by BigQuery"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "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__ad_group_report": {"metadata": {"type": "table", "schema": "apple_search_ads_integration_tests_apple_search_ads", "name": "apple_search_ads__ad_group_report", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"date_day": {"type": "DATE", "index": 1, "name": "date_day", "comment": null}, "organization_id": {"type": "INT64", "index": 2, "name": "organization_id", "comment": null}, "organization_name": {"type": "STRING", "index": 3, "name": "organization_name", "comment": null}, "campaign_id": {"type": "INT64", "index": 4, "name": "campaign_id", "comment": null}, "campaign_name": {"type": "STRING", "index": 5, "name": "campaign_name", "comment": null}, "ad_group_id": {"type": "INT64", "index": 6, "name": "ad_group_id", "comment": null}, "ad_group_name": {"type": "STRING", "index": 7, "name": "ad_group_name", "comment": null}, "currency": {"type": "STRING", "index": 8, "name": "currency", "comment": null}, "ad_group_status": {"type": "STRING", "index": 9, "name": "ad_group_status", "comment": null}, "start_at": {"type": "TIMESTAMP", "index": 10, "name": "start_at", "comment": null}, "end_at": {"type": "TIMESTAMP", "index": 11, "name": "end_at", "comment": null}, "taps": {"type": "INT64", "index": 12, "name": "taps", "comment": null}, "new_downloads": {"type": "INT64", "index": 13, "name": "new_downloads", "comment": null}, "redownloads": {"type": "INT64", "index": 14, "name": "redownloads", "comment": null}, "total_downloads": {"type": "INT64", "index": 15, "name": "total_downloads", "comment": null}, "impressions": {"type": "INT64", "index": 16, "name": "impressions", "comment": null}, "spend": {"type": "FLOAT64", "index": 17, "name": "spend", "comment": null}}, "stats": {"num_rows": {"id": "num_rows", "label": "# Rows", "value": 13.0, "include": true, "description": "Approximate count of rows in this table"}, "num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 1925.0, "include": true, "description": "Approximate size of table as reported by BigQuery"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "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_source.stg_apple_search_ads__ad_group_history_tmp": {"metadata": {"type": "view", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "name": "stg_apple_search_ads__ad_group_history_tmp", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"id": {"type": "INT64", "index": 1, "name": "id", "comment": null}, "modification_time": {"type": "TIMESTAMP", "index": 2, "name": "modification_time", "comment": null}, "automated_keywords_opt_in": {"type": "BOOL", "index": 3, "name": "automated_keywords_opt_in", "comment": null}, "campaign_id": {"type": "INT64", "index": 4, "name": "campaign_id", "comment": null}, "cpa_goal_amount": {"type": "INT64", "index": 5, "name": "cpa_goal_amount", "comment": null}, "cpa_goal_currency": {"type": "INT64", "index": 6, "name": "cpa_goal_currency", "comment": null}, "default_cpc_bid_amount": {"type": "INT64", "index": 7, "name": "default_cpc_bid_amount", "comment": null}, "default_cpc_bid_currency": {"type": "INT64", "index": 8, "name": "default_cpc_bid_currency", "comment": null}, "deleted": {"type": "BOOL", "index": 9, "name": "deleted", "comment": null}, "end_time": {"type": "TIMESTAMP", "index": 10, "name": "end_time", "comment": null}, "name": {"type": "STRING", "index": 11, "name": "name", "comment": null}, "organization_id": {"type": "INT64", "index": 12, "name": "organization_id", "comment": null}, "serving_state_reasons": {"type": "INT64", "index": 13, "name": "serving_state_reasons", "comment": null}, "serving_status": {"type": "STRING", "index": 14, "name": "serving_status", "comment": null}, "start_time": {"type": "TIMESTAMP", "index": 15, "name": "start_time", "comment": null}, "status": {"type": "STRING", "index": 16, "name": "status", "comment": null}, "storefronts": {"type": "INT64", "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_source.stg_apple_search_ads__ad_group_history_tmp"}, "model.apple_search_ads_source.stg_apple_search_ads__organization": {"metadata": {"type": "table", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "name": "stg_apple_search_ads__organization", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"organization_id": {"type": "INT64", "index": 1, "name": "organization_id", "comment": null}, "currency": {"type": "STRING", "index": 2, "name": "currency", "comment": null}, "payment_model": {"type": "STRING", "index": 3, "name": "payment_model", "comment": null}, "organization_name": {"type": "STRING", "index": 4, "name": "organization_name", "comment": null}, "time_zone": {"type": "STRING", "index": 5, "name": "time_zone", "comment": null}}, "stats": {"num_rows": {"id": "num_rows", "label": "# Rows", "value": 2.0, "include": true, "description": "Approximate count of rows in this table"}, "num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 80.0, "include": true, "description": "Approximate size of table as reported by BigQuery"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.apple_search_ads_source.stg_apple_search_ads__organization"}, "model.apple_search_ads_source.stg_apple_search_ads__ad_report": {"metadata": {"type": "table", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "name": "stg_apple_search_ads__ad_report", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"date_day": {"type": "DATE", "index": 1, "name": "date_day", "comment": null}, "campaign_id": {"type": "INT64", "index": 2, "name": "campaign_id", "comment": null}, "ad_group_id": {"type": "INT64", "index": 3, "name": "ad_group_id", "comment": null}, "ad_id": {"type": "INT64", "index": 4, "name": "ad_id", "comment": null}, "impressions": {"type": "INT64", "index": 5, "name": "impressions", "comment": null}, "spend": {"type": "FLOAT64", "index": 6, "name": "spend", "comment": null}, "currency": {"type": "STRING", "index": 7, "name": "currency", "comment": null}, "new_downloads": {"type": "INT64", "index": 8, "name": "new_downloads", "comment": null}, "redownloads": {"type": "INT64", "index": 9, "name": "redownloads", "comment": null}, "taps": {"type": "INT64", "index": 10, "name": "taps", "comment": null}}, "stats": {"num_rows": {"id": "num_rows", "label": "# Rows", "value": 2.0, "include": true, "description": "Approximate count of rows in this table"}, "num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 154.0, "include": true, "description": "Approximate size of table as reported by BigQuery"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.apple_search_ads_source.stg_apple_search_ads__ad_report"}, "model.apple_search_ads_source.stg_apple_search_ads__ad_group_report_tmp": {"metadata": {"type": "view", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "name": "stg_apple_search_ads__ad_group_report_tmp", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"ad_group_id": {"type": "INT64", "index": 1, "name": "ad_group_id", "comment": null}, "date": {"type": "DATE", "index": 2, "name": "date", "comment": null}, "avg_cpa_amount": {"type": "FLOAT64", "index": 3, "name": "avg_cpa_amount", "comment": null}, "avg_cpa_currency": {"type": "STRING", "index": 4, "name": "avg_cpa_currency", "comment": null}, "avg_cpt_amount": {"type": "FLOAT64", "index": 5, "name": "avg_cpt_amount", "comment": null}, "avg_cpt_currency": {"type": "STRING", "index": 6, "name": "avg_cpt_currency", "comment": null}, "conversion_rate": {"type": "FLOAT64", "index": 7, "name": "conversion_rate", "comment": null}, "conversions": {"type": "INT64", "index": 8, "name": "conversions", "comment": null}, "impressions": {"type": "INT64", "index": 9, "name": "impressions", "comment": null}, "lat_off_installs": {"type": "INT64", "index": 10, "name": "lat_off_installs", "comment": null}, "lat_on_installs": {"type": "INT64", "index": 11, "name": "lat_on_installs", "comment": null}, "local_spend_amount": {"type": "FLOAT64", "index": 12, "name": "local_spend_amount", "comment": null}, "local_spend_currency": {"type": "STRING", "index": 13, "name": "local_spend_currency", "comment": null}, "new_downloads": {"type": "INT64", "index": 14, "name": "new_downloads", "comment": null}, "redownloads": {"type": "INT64", "index": 15, "name": "redownloads", "comment": null}, "tap_through_rate": {"type": "FLOAT64", "index": 16, "name": "tap_through_rate", "comment": null}, "taps": {"type": "INT64", "index": 17, "name": "taps", "comment": null}}, "stats": {"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_source.stg_apple_search_ads__ad_group_report_tmp"}, "model.apple_search_ads_source.stg_apple_search_ads__ad_report_tmp": {"metadata": {"type": "view", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "name": "stg_apple_search_ads__ad_report_tmp", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"date": {"type": "DATE", "index": 1, "name": "date", "comment": null}, "_fivetran_synced": {"type": "TIMESTAMP", "index": 2, "name": "_fivetran_synced", "comment": null}, "campaign_id": {"type": "INT64", "index": 3, "name": "campaign_id", "comment": null}, "ad_group_id": {"type": "INT64", "index": 4, "name": "ad_group_id", "comment": null}, "ad_id": {"type": "INT64", "index": 5, "name": "ad_id", "comment": null}, "impressions": {"type": "INT64", "index": 6, "name": "impressions", "comment": null}, "local_spend_amount": {"type": "FLOAT64", "index": 7, "name": "local_spend_amount", "comment": null}, "local_spend_currency": {"type": "STRING", "index": 8, "name": "local_spend_currency", "comment": null}, "new_downloads": {"type": "INT64", "index": 9, "name": "new_downloads", "comment": null}, "redownloads": {"type": "INT64", "index": 10, "name": "redownloads", "comment": null}, "taps": {"type": "INT64", "index": 11, "name": "taps", "comment": null}}, "stats": {"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_source.stg_apple_search_ads__ad_report_tmp"}, "model.apple_search_ads_source.stg_apple_search_ads__search_term_report": {"metadata": {"type": "table", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "name": "stg_apple_search_ads__search_term_report", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"date_day": {"type": "DATE", "index": 1, "name": "date_day", "comment": null}, "_fivetran_id": {"type": "STRING", "index": 2, "name": "_fivetran_id", "comment": null}, "campaign_id": {"type": "INT64", "index": 3, "name": "campaign_id", "comment": null}, "ad_group_id": {"type": "INT64", "index": 4, "name": "ad_group_id", "comment": null}, "ad_group_name": {"type": "STRING", "index": 5, "name": "ad_group_name", "comment": null}, "bid_amount": {"type": "FLOAT64", "index": 6, "name": "bid_amount", "comment": null}, "bid_currency": {"type": "STRING", "index": 7, "name": "bid_currency", "comment": null}, "keyword_text": {"type": "STRING", "index": 8, "name": "keyword_text", "comment": null}, "keyword_display_status": {"type": "STRING", "index": 9, "name": "keyword_display_status", "comment": null}, "keyword_id": {"type": "INT64", "index": 10, "name": "keyword_id", "comment": null}, "spend": {"type": "FLOAT64", "index": 11, "name": "spend", "comment": null}, "currency": {"type": "STRING", "index": 12, "name": "currency", "comment": null}, "match_type": {"type": "STRING", "index": 13, "name": "match_type", "comment": null}, "search_term_source": {"type": "STRING", "index": 14, "name": "search_term_source", "comment": null}, "search_term_text": {"type": "STRING", "index": 15, "name": "search_term_text", "comment": null}, "impressions": {"type": "INT64", "index": 16, "name": "impressions", "comment": null}, "taps": {"type": "INT64", "index": 17, "name": "taps", "comment": null}, "new_downloads": {"type": "INT64", "index": 18, "name": "new_downloads", "comment": null}, "redownloads": {"type": "INT64", "index": 19, "name": "redownloads", "comment": null}}, "stats": {"num_rows": {"id": "num_rows", "label": "# Rows", "value": 150.0, "include": true, "description": "Approximate count of rows in this table"}, "num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 25324.0, "include": true, "description": "Approximate size of table as reported by BigQuery"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.apple_search_ads_source.stg_apple_search_ads__search_term_report"}, "model.apple_search_ads_source.stg_apple_search_ads__search_term_report_tmp": {"metadata": {"type": "view", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "name": "stg_apple_search_ads__search_term_report_tmp", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"_fivetran_id": {"type": "STRING", "index": 1, "name": "_fivetran_id", "comment": null}, "ad_group_id": {"type": "INT64", "index": 2, "name": "ad_group_id", "comment": null}, "campaign_id": {"type": "INT64", "index": 3, "name": "campaign_id", "comment": null}, "date": {"type": "DATE", "index": 4, "name": "date", "comment": null}, "ad_group_deleted": {"type": "BOOL", "index": 5, "name": "ad_group_deleted", "comment": null}, "ad_group_name": {"type": "STRING", "index": 6, "name": "ad_group_name", "comment": null}, "avg_cpa_amount": {"type": "FLOAT64", "index": 7, "name": "avg_cpa_amount", "comment": null}, "avg_cpa_currency": {"type": "STRING", "index": 8, "name": "avg_cpa_currency", "comment": null}, "avg_cpt_amount": {"type": "FLOAT64", "index": 9, "name": "avg_cpt_amount", "comment": null}, "avg_cpt_currency": {"type": "STRING", "index": 10, "name": "avg_cpt_currency", "comment": null}, "bid_amount_amount": {"type": "FLOAT64", "index": 11, "name": "bid_amount_amount", "comment": null}, "bid_amount_currency": {"type": "STRING", "index": 12, "name": "bid_amount_currency", "comment": null}, "conversion_rate": {"type": "FLOAT64", "index": 13, "name": "conversion_rate", "comment": null}, "conversions": {"type": "INT64", "index": 14, "name": "conversions", "comment": null}, "deleted": {"type": "BOOL", "index": 15, "name": "deleted", "comment": null}, "impressions": {"type": "INT64", "index": 16, "name": "impressions", "comment": null}, "keyword": {"type": "STRING", "index": 17, "name": "keyword", "comment": null}, "keyword_display_status": {"type": "STRING", "index": 18, "name": "keyword_display_status", "comment": null}, "keyword_id": {"type": "INT64", "index": 19, "name": "keyword_id", "comment": null}, "lat_off_installs": {"type": "INT64", "index": 20, "name": "lat_off_installs", "comment": null}, "lat_on_installs": {"type": "INT64", "index": 21, "name": "lat_on_installs", "comment": null}, "local_spend_amount": {"type": "FLOAT64", "index": 22, "name": "local_spend_amount", "comment": null}, "local_spend_currency": {"type": "STRING", "index": 23, "name": "local_spend_currency", "comment": null}, "match_type": {"type": "STRING", "index": 24, "name": "match_type", "comment": null}, "new_downloads": {"type": "INT64", "index": 25, "name": "new_downloads", "comment": null}, "redownloads": {"type": "INT64", "index": 26, "name": "redownloads", "comment": null}, "search_term_source": {"type": "STRING", "index": 27, "name": "search_term_source", "comment": null}, "search_term_text": {"type": "STRING", "index": 28, "name": "search_term_text", "comment": null}, "tap_through_rate": {"type": "FLOAT64", "index": 29, "name": "tap_through_rate", "comment": null}, "taps": {"type": "INT64", "index": 30, "name": "taps", "comment": null}}, "stats": {"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_source.stg_apple_search_ads__search_term_report_tmp"}, "model.apple_search_ads_source.stg_apple_search_ads__keyword_report_tmp": {"metadata": {"type": "view", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "name": "stg_apple_search_ads__keyword_report_tmp", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"date": {"type": "DATE", "index": 1, "name": "date", "comment": null}, "id": {"type": "INT64", "index": 2, "name": "id", "comment": null}, "avg_cpa_amount": {"type": "FLOAT64", "index": 3, "name": "avg_cpa_amount", "comment": null}, "avg_cpa_currency": {"type": "STRING", "index": 4, "name": "avg_cpa_currency", "comment": null}, "avg_cpt_amount": {"type": "FLOAT64", "index": 5, "name": "avg_cpt_amount", "comment": null}, "avg_cpt_currency": {"type": "STRING", "index": 6, "name": "avg_cpt_currency", "comment": null}, "conversion_rate": {"type": "FLOAT64", "index": 7, "name": "conversion_rate", "comment": null}, "conversions": {"type": "INT64", "index": 8, "name": "conversions", "comment": null}, "impressions": {"type": "INT64", "index": 9, "name": "impressions", "comment": null}, "lat_off_installs": {"type": "INT64", "index": 10, "name": "lat_off_installs", "comment": null}, "lat_on_installs": {"type": "INT64", "index": 11, "name": "lat_on_installs", "comment": null}, "local_spend_amount": {"type": "FLOAT64", "index": 12, "name": "local_spend_amount", "comment": null}, "local_spend_currency": {"type": "STRING", "index": 13, "name": "local_spend_currency", "comment": null}, "new_downloads": {"type": "INT64", "index": 14, "name": "new_downloads", "comment": null}, "redownloads": {"type": "INT64", "index": 15, "name": "redownloads", "comment": null}, "tap_through_rate": {"type": "FLOAT64", "index": 16, "name": "tap_through_rate", "comment": null}, "taps": {"type": "INT64", "index": 17, "name": "taps", "comment": null}}, "stats": {"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_source.stg_apple_search_ads__keyword_report_tmp"}, "model.apple_search_ads_source.stg_apple_search_ads__campaign_report": {"metadata": {"type": "table", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "name": "stg_apple_search_ads__campaign_report", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"date_day": {"type": "DATE", "index": 1, "name": "date_day", "comment": null}, "campaign_id": {"type": "INT64", "index": 2, "name": "campaign_id", "comment": null}, "impressions": {"type": "INT64", "index": 3, "name": "impressions", "comment": null}, "spend": {"type": "FLOAT64", "index": 4, "name": "spend", "comment": null}, "currency": {"type": "STRING", "index": 5, "name": "currency", "comment": null}, "new_downloads": {"type": "INT64", "index": 6, "name": "new_downloads", "comment": null}, "redownloads": {"type": "INT64", "index": 7, "name": "redownloads", "comment": null}, "taps": {"type": "INT64", "index": 8, "name": "taps", "comment": null}}, "stats": {"num_rows": {"id": "num_rows", "label": "# Rows", "value": 12.0, "include": true, "description": "Approximate count of rows in this table"}, "num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 732.0, "include": true, "description": "Approximate size of table as reported by BigQuery"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.apple_search_ads_source.stg_apple_search_ads__campaign_report"}, "model.apple_search_ads_source.stg_apple_search_ads__organization_tmp": {"metadata": {"type": "view", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "name": "stg_apple_search_ads__organization_tmp", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"id": {"type": "INT64", "index": 1, "name": "id", "comment": null}, "currency": {"type": "STRING", "index": 2, "name": "currency", "comment": null}, "name": {"type": "STRING", "index": 3, "name": "name", "comment": null}, "payment_model": {"type": "STRING", "index": 4, "name": "payment_model", "comment": null}, "role_names": {"type": "STRING", "index": 5, "name": "role_names", "comment": null}, "time_zone": {"type": "STRING", "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_source.stg_apple_search_ads__organization_tmp"}, "model.apple_search_ads_source.stg_apple_search_ads__campaign_history_tmp": {"metadata": {"type": "view", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "name": "stg_apple_search_ads__campaign_history_tmp", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"id": {"type": "INT64", "index": 1, "name": "id", "comment": null}, "modification_time": {"type": "TIMESTAMP", "index": 2, "name": "modification_time", "comment": null}, "adam_id": {"type": "INT64", "index": 3, "name": "adam_id", "comment": null}, "budget_amount": {"type": "INT64", "index": 4, "name": "budget_amount", "comment": null}, "budget_currency": {"type": "STRING", "index": 5, "name": "budget_currency", "comment": null}, "budget_orders": {"type": "STRING", "index": 6, "name": "budget_orders", "comment": null}, "daily_budget_amount": {"type": "INT64", "index": 7, "name": "daily_budget_amount", "comment": null}, "daily_budget_currency": {"type": "STRING", "index": 8, "name": "daily_budget_currency", "comment": null}, "deleted": {"type": "BOOL", "index": 9, "name": "deleted", "comment": null}, "end_time": {"type": "TIMESTAMP", "index": 10, "name": "end_time", "comment": null}, "loc_invoice_detail_buyer_email": {"type": "INT64", "index": 11, "name": "loc_invoice_detail_buyer_email", "comment": null}, "loc_invoice_detail_buyer_name": {"type": "INT64", "index": 12, "name": "loc_invoice_detail_buyer_name", "comment": null}, "loc_invoice_detail_client_name": {"type": "INT64", "index": 13, "name": "loc_invoice_detail_client_name", "comment": null}, "loc_invoice_detail_order_number": {"type": "INT64", "index": 14, "name": "loc_invoice_detail_order_number", "comment": null}, "name": {"type": "STRING", "index": 15, "name": "name", "comment": null}, "organization_id": {"type": "INT64", "index": 16, "name": "organization_id", "comment": null}, "payment_model": {"type": "STRING", "index": 17, "name": "payment_model", "comment": null}, "serving_state_reasons": {"type": "STRING", "index": 18, "name": "serving_state_reasons", "comment": null}, "serving_status": {"type": "STRING", "index": 19, "name": "serving_status", "comment": null}, "start_time": {"type": "TIMESTAMP", "index": 20, "name": "start_time", "comment": null}, "status": {"type": "STRING", "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_source.stg_apple_search_ads__campaign_history_tmp"}, "model.apple_search_ads_source.stg_apple_search_ads__ad_history_tmp": {"metadata": {"type": "view", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "name": "stg_apple_search_ads__ad_history_tmp", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"creation_time": {"type": "TIMESTAMP", "index": 1, "name": "creation_time", "comment": null}, "modification_time": {"type": "TIMESTAMP", "index": 2, "name": "modification_time", "comment": null}, "org_id": {"type": "INT64", "index": 3, "name": "org_id", "comment": null}, "campaign_id": {"type": "INT64", "index": 4, "name": "campaign_id", "comment": null}, "ad_group_id": {"type": "INT64", "index": 5, "name": "ad_group_id", "comment": null}, "name": {"type": "STRING", "index": 6, "name": "name", "comment": null}, "id": {"type": "INT64", "index": 7, "name": "id", "comment": null}, "creative_id": {"type": "INT64", "index": 8, "name": "creative_id", "comment": null}, "creative_type": {"type": "STRING", "index": 9, "name": "creative_type", "comment": null}, "status": {"type": "STRING", "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_source.stg_apple_search_ads__ad_history_tmp"}, "model.apple_search_ads_source.stg_apple_search_ads__ad_group_report": {"metadata": {"type": "table", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "name": "stg_apple_search_ads__ad_group_report", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"date_day": {"type": "DATE", "index": 1, "name": "date_day", "comment": null}, "ad_group_id": {"type": "INT64", "index": 2, "name": "ad_group_id", "comment": null}, "impressions": {"type": "INT64", "index": 3, "name": "impressions", "comment": null}, "spend": {"type": "FLOAT64", "index": 4, "name": "spend", "comment": null}, "currency": {"type": "STRING", "index": 5, "name": "currency", "comment": null}, "new_downloads": {"type": "INT64", "index": 6, "name": "new_downloads", "comment": null}, "redownloads": {"type": "INT64", "index": 7, "name": "redownloads", "comment": null}, "taps": {"type": "INT64", "index": 8, "name": "taps", "comment": null}}, "stats": {"num_rows": {"id": "num_rows", "label": "# Rows", "value": 13.0, "include": true, "description": "Approximate count of rows in this table"}, "num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 793.0, "include": true, "description": "Approximate size of table as reported by BigQuery"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.apple_search_ads_source.stg_apple_search_ads__ad_group_report"}, "model.apple_search_ads_source.stg_apple_search_ads__ad_group_history": {"metadata": {"type": "table", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "name": "stg_apple_search_ads__ad_group_history", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"modified_at": {"type": "TIMESTAMP", "index": 1, "name": "modified_at", "comment": null}, "organization_id": {"type": "INT64", "index": 2, "name": "organization_id", "comment": null}, "campaign_id": {"type": "INT64", "index": 3, "name": "campaign_id", "comment": null}, "ad_group_name": {"type": "STRING", "index": 4, "name": "ad_group_name", "comment": null}, "ad_group_id": {"type": "INT64", "index": 5, "name": "ad_group_id", "comment": null}, "ad_group_status": {"type": "STRING", "index": 6, "name": "ad_group_status", "comment": null}, "start_at": {"type": "TIMESTAMP", "index": 7, "name": "start_at", "comment": null}, "end_at": {"type": "TIMESTAMP", "index": 8, "name": "end_at", "comment": null}, "is_most_recent_record": {"type": "BOOL", "index": 9, "name": "is_most_recent_record", "comment": null}}, "stats": {"num_rows": {"id": "num_rows", "label": "# Rows", "value": 4.0, "include": true, "description": "Approximate count of rows in this table"}, "num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 294.0, "include": true, "description": "Approximate size of table as reported by BigQuery"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.apple_search_ads_source.stg_apple_search_ads__ad_group_history"}, "model.apple_search_ads_source.stg_apple_search_ads__keyword_report": {"metadata": {"type": "table", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "name": "stg_apple_search_ads__keyword_report", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"date_day": {"type": "DATE", "index": 1, "name": "date_day", "comment": null}, "keyword_id": {"type": "INT64", "index": 2, "name": "keyword_id", "comment": null}, "impressions": {"type": "INT64", "index": 3, "name": "impressions", "comment": null}, "spend": {"type": "FLOAT64", "index": 4, "name": "spend", "comment": null}, "currency": {"type": "STRING", "index": 5, "name": "currency", "comment": null}, "new_downloads": {"type": "INT64", "index": 6, "name": "new_downloads", "comment": null}, "redownloads": {"type": "INT64", "index": 7, "name": "redownloads", "comment": null}, "taps": {"type": "INT64", "index": 8, "name": "taps", "comment": null}}, "stats": {"num_rows": {"id": "num_rows", "label": "# Rows", "value": 99.0, "include": true, "description": "Approximate count of rows in this table"}, "num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 6039.0, "include": true, "description": "Approximate size of table as reported by BigQuery"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.apple_search_ads_source.stg_apple_search_ads__keyword_report"}, "model.apple_search_ads_source.stg_apple_search_ads__campaign_history": {"metadata": {"type": "table", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "name": "stg_apple_search_ads__campaign_history", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"modified_at": {"type": "TIMESTAMP", "index": 1, "name": "modified_at", "comment": null}, "organization_id": {"type": "INT64", "index": 2, "name": "organization_id", "comment": null}, "campaign_name": {"type": "STRING", "index": 3, "name": "campaign_name", "comment": null}, "campaign_id": {"type": "INT64", "index": 4, "name": "campaign_id", "comment": null}, "campaign_status": {"type": "STRING", "index": 5, "name": "campaign_status", "comment": null}, "start_at": {"type": "TIMESTAMP", "index": 6, "name": "start_at", "comment": null}, "end_at": {"type": "TIMESTAMP", "index": 7, "name": "end_at", "comment": null}, "is_most_recent_record": {"type": "BOOL", "index": 8, "name": "is_most_recent_record", "comment": null}}, "stats": {"num_rows": {"id": "num_rows", "label": "# Rows", "value": 3.0, "include": true, "description": "Approximate count of rows in this table"}, "num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 179.0, "include": true, "description": "Approximate size of table as reported by BigQuery"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.apple_search_ads_source.stg_apple_search_ads__campaign_history"}, "model.apple_search_ads_source.stg_apple_search_ads__keyword_history": {"metadata": {"type": "table", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "name": "stg_apple_search_ads__keyword_history", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"modified_at": {"type": "TIMESTAMP", "index": 1, "name": "modified_at", "comment": null}, "campaign_id": {"type": "INT64", "index": 2, "name": "campaign_id", "comment": null}, "ad_group_id": {"type": "INT64", "index": 3, "name": "ad_group_id", "comment": null}, "keyword_id": {"type": "INT64", "index": 4, "name": "keyword_id", "comment": null}, "bid_amount": {"type": "FLOAT64", "index": 5, "name": "bid_amount", "comment": null}, "bid_currency": {"type": "STRING", "index": 6, "name": "bid_currency", "comment": null}, "match_type": {"type": "STRING", "index": 7, "name": "match_type", "comment": null}, "keyword_status": {"type": "STRING", "index": 8, "name": "keyword_status", "comment": null}, "keyword_text": {"type": "STRING", "index": 9, "name": "keyword_text", "comment": null}, "is_most_recent_record": {"type": "BOOL", "index": 10, "name": "is_most_recent_record", "comment": null}}, "stats": {"num_rows": {"id": "num_rows", "label": "# Rows", "value": 16.0, "include": true, "description": "Approximate count of rows in this table"}, "num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 1151.0, "include": true, "description": "Approximate size of table as reported by BigQuery"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.apple_search_ads_source.stg_apple_search_ads__keyword_history"}, "model.apple_search_ads_source.stg_apple_search_ads__keyword_history_tmp": {"metadata": {"type": "view", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "name": "stg_apple_search_ads__keyword_history_tmp", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"id": {"type": "INT64", "index": 1, "name": "id", "comment": null}, "modification_time": {"type": "TIMESTAMP", "index": 2, "name": "modification_time", "comment": null}, "ad_group_id": {"type": "INT64", "index": 3, "name": "ad_group_id", "comment": null}, "bid_amount": {"type": "FLOAT64", "index": 4, "name": "bid_amount", "comment": null}, "bid_currency": {"type": "STRING", "index": 5, "name": "bid_currency", "comment": null}, "campaign_id": {"type": "INT64", "index": 6, "name": "campaign_id", "comment": null}, "deleted": {"type": "BOOL", "index": 7, "name": "deleted", "comment": null}, "match_type": {"type": "STRING", "index": 8, "name": "match_type", "comment": null}, "status": {"type": "STRING", "index": 9, "name": "status", "comment": null}, "text": {"type": "STRING", "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_source.stg_apple_search_ads__keyword_history_tmp"}, "model.apple_search_ads_source.stg_apple_search_ads__campaign_report_tmp": {"metadata": {"type": "view", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "name": "stg_apple_search_ads__campaign_report_tmp", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"date": {"type": "DATE", "index": 1, "name": "date", "comment": null}, "id": {"type": "INT64", "index": 2, "name": "id", "comment": null}, "avg_cpa_amount": {"type": "FLOAT64", "index": 3, "name": "avg_cpa_amount", "comment": null}, "avg_cpa_currency": {"type": "STRING", "index": 4, "name": "avg_cpa_currency", "comment": null}, "avg_cpt_amount": {"type": "FLOAT64", "index": 5, "name": "avg_cpt_amount", "comment": null}, "avg_cpt_currency": {"type": "STRING", "index": 6, "name": "avg_cpt_currency", "comment": null}, "conversion_rate": {"type": "FLOAT64", "index": 7, "name": "conversion_rate", "comment": null}, "conversions": {"type": "INT64", "index": 8, "name": "conversions", "comment": null}, "impressions": {"type": "INT64", "index": 9, "name": "impressions", "comment": null}, "lat_off_installs": {"type": "INT64", "index": 10, "name": "lat_off_installs", "comment": null}, "lat_on_installs": {"type": "INT64", "index": 11, "name": "lat_on_installs", "comment": null}, "local_spend_amount": {"type": "FLOAT64", "index": 12, "name": "local_spend_amount", "comment": null}, "local_spend_currency": {"type": "STRING", "index": 13, "name": "local_spend_currency", "comment": null}, "new_downloads": {"type": "INT64", "index": 14, "name": "new_downloads", "comment": null}, "redownloads": {"type": "INT64", "index": 15, "name": "redownloads", "comment": null}, "tap_through_rate": {"type": "FLOAT64", "index": 16, "name": "tap_through_rate", "comment": null}, "taps": {"type": "INT64", "index": 17, "name": "taps", "comment": null}}, "stats": {"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_source.stg_apple_search_ads__campaign_report_tmp"}, "model.apple_search_ads_source.stg_apple_search_ads__ad_history": {"metadata": {"type": "table", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "name": "stg_apple_search_ads__ad_history", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"created_at": {"type": "TIMESTAMP", "index": 1, "name": "created_at", "comment": null}, "modified_at": {"type": "TIMESTAMP", "index": 2, "name": "modified_at", "comment": null}, "organization_id": {"type": "INT64", "index": 3, "name": "organization_id", "comment": null}, "campaign_id": {"type": "INT64", "index": 4, "name": "campaign_id", "comment": null}, "ad_group_id": {"type": "INT64", "index": 5, "name": "ad_group_id", "comment": null}, "ad_name": {"type": "STRING", "index": 6, "name": "ad_name", "comment": null}, "ad_id": {"type": "INT64", "index": 7, "name": "ad_id", "comment": null}, "ad_status": {"type": "STRING", "index": 8, "name": "ad_status", "comment": null}, "is_most_recent_record": {"type": "BOOL", "index": 9, "name": "is_most_recent_record", "comment": null}}, "stats": {"num_rows": {"id": "num_rows", "label": "# Rows", "value": 1.0, "include": true, "description": "Approximate count of rows in this table"}, "num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 73.0, "include": true, "description": "Approximate size of table as reported by BigQuery"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.apple_search_ads_source.stg_apple_search_ads__ad_history"}, "seed.apple_search_ads_integration_tests.ad_group_report_data": {"metadata": {"type": "table", "schema": "apple_search_ads_integration_tests", "name": "ad_group_report_data", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"ad_group_id": {"type": "INT64", "index": 1, "name": "ad_group_id", "comment": null}, "date": {"type": "DATE", "index": 2, "name": "date", "comment": null}, "avg_cpa_amount": {"type": "FLOAT64", "index": 3, "name": "avg_cpa_amount", "comment": null}, "avg_cpa_currency": {"type": "STRING", "index": 4, "name": "avg_cpa_currency", "comment": null}, "avg_cpt_amount": {"type": "FLOAT64", "index": 5, "name": "avg_cpt_amount", "comment": null}, "avg_cpt_currency": {"type": "STRING", "index": 6, "name": "avg_cpt_currency", "comment": null}, "conversion_rate": {"type": "FLOAT64", "index": 7, "name": "conversion_rate", "comment": null}, "conversions": {"type": "INT64", "index": 8, "name": "conversions", "comment": null}, "impressions": {"type": "INT64", "index": 9, "name": "impressions", "comment": null}, "lat_off_installs": {"type": "INT64", "index": 10, "name": "lat_off_installs", "comment": null}, "lat_on_installs": {"type": "INT64", "index": 11, "name": "lat_on_installs", "comment": null}, "local_spend_amount": {"type": "FLOAT64", "index": 12, "name": "local_spend_amount", "comment": null}, "local_spend_currency": {"type": "STRING", "index": 13, "name": "local_spend_currency", "comment": null}, "new_downloads": {"type": "INT64", "index": 14, "name": "new_downloads", "comment": null}, "redownloads": {"type": "INT64", "index": 15, "name": "redownloads", "comment": null}, "tap_through_rate": {"type": "FLOAT64", "index": 16, "name": "tap_through_rate", "comment": null}, "taps": {"type": "INT64", "index": 17, "name": "taps", "comment": null}}, "stats": {"num_rows": {"id": "num_rows", "label": "# Rows", "value": 13.0, "include": true, "description": "Approximate count of rows in this table"}, "num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 1651.0, "include": true, "description": "Approximate size of table as reported by BigQuery"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.apple_search_ads_integration_tests.ad_group_report_data"}, "seed.apple_search_ads_integration_tests.search_term_report_data": {"metadata": {"type": "table", "schema": "apple_search_ads_integration_tests", "name": "search_term_report_data", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"_fivetran_id": {"type": "STRING", "index": 1, "name": "_fivetran_id", "comment": null}, "ad_group_id": {"type": "INT64", "index": 2, "name": "ad_group_id", "comment": null}, "campaign_id": {"type": "INT64", "index": 3, "name": "campaign_id", "comment": null}, "date": {"type": "DATE", "index": 4, "name": "date", "comment": null}, "ad_group_deleted": {"type": "BOOL", "index": 5, "name": "ad_group_deleted", "comment": null}, "ad_group_name": {"type": "STRING", "index": 6, "name": "ad_group_name", "comment": null}, "avg_cpa_amount": {"type": "FLOAT64", "index": 7, "name": "avg_cpa_amount", "comment": null}, "avg_cpa_currency": {"type": "STRING", "index": 8, "name": "avg_cpa_currency", "comment": null}, "avg_cpt_amount": {"type": "FLOAT64", "index": 9, "name": "avg_cpt_amount", "comment": null}, "avg_cpt_currency": {"type": "STRING", "index": 10, "name": "avg_cpt_currency", "comment": null}, "bid_amount_amount": {"type": "FLOAT64", "index": 11, "name": "bid_amount_amount", "comment": null}, "bid_amount_currency": {"type": "STRING", "index": 12, "name": "bid_amount_currency", "comment": null}, "conversion_rate": {"type": "FLOAT64", "index": 13, "name": "conversion_rate", "comment": null}, "conversions": {"type": "INT64", "index": 14, "name": "conversions", "comment": null}, "deleted": {"type": "BOOL", "index": 15, "name": "deleted", "comment": null}, "impressions": {"type": "INT64", "index": 16, "name": "impressions", "comment": null}, "keyword": {"type": "STRING", "index": 17, "name": "keyword", "comment": null}, "keyword_display_status": {"type": "STRING", "index": 18, "name": "keyword_display_status", "comment": null}, "keyword_id": {"type": "INT64", "index": 19, "name": "keyword_id", "comment": null}, "lat_off_installs": {"type": "INT64", "index": 20, "name": "lat_off_installs", "comment": null}, "lat_on_installs": {"type": "INT64", "index": 21, "name": "lat_on_installs", "comment": null}, "local_spend_amount": {"type": "FLOAT64", "index": 22, "name": "local_spend_amount", "comment": null}, "local_spend_currency": {"type": "STRING", "index": 23, "name": "local_spend_currency", "comment": null}, "match_type": {"type": "STRING", "index": 24, "name": "match_type", "comment": null}, "new_downloads": {"type": "INT64", "index": 25, "name": "new_downloads", "comment": null}, "redownloads": {"type": "INT64", "index": 26, "name": "redownloads", "comment": null}, "search_term_source": {"type": "STRING", "index": 27, "name": "search_term_source", "comment": null}, "search_term_text": {"type": "STRING", "index": 28, "name": "search_term_text", "comment": null}, "tap_through_rate": {"type": "FLOAT64", "index": 29, "name": "tap_through_rate", "comment": null}, "taps": {"type": "INT64", "index": 30, "name": "taps", "comment": null}}, "stats": {"num_rows": {"id": "num_rows", "label": "# Rows", "value": 150.0, "include": true, "description": "Approximate count of rows in this table"}, "num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 35485.0, "include": true, "description": "Approximate size of table as reported by BigQuery"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.apple_search_ads_integration_tests.search_term_report_data"}, "seed.apple_search_ads_integration_tests.ad_report_data": {"metadata": {"type": "table", "schema": "apple_search_ads_integration_tests", "name": "ad_report_data", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"date": {"type": "DATE", "index": 1, "name": "date", "comment": null}, "_fivetran_synced": {"type": "TIMESTAMP", "index": 2, "name": "_fivetran_synced", "comment": null}, "campaign_id": {"type": "INT64", "index": 3, "name": "campaign_id", "comment": null}, "ad_group_id": {"type": "INT64", "index": 4, "name": "ad_group_id", "comment": null}, "ad_id": {"type": "INT64", "index": 5, "name": "ad_id", "comment": null}, "impressions": {"type": "INT64", "index": 6, "name": "impressions", "comment": null}, "local_spend_amount": {"type": "FLOAT64", "index": 7, "name": "local_spend_amount", "comment": null}, "local_spend_currency": {"type": "STRING", "index": 8, "name": "local_spend_currency", "comment": null}, "new_downloads": {"type": "INT64", "index": 9, "name": "new_downloads", "comment": null}, "redownloads": {"type": "INT64", "index": 10, "name": "redownloads", "comment": null}, "taps": {"type": "INT64", "index": 11, "name": "taps", "comment": null}}, "stats": {"num_rows": {"id": "num_rows", "label": "# Rows", "value": 2.0, "include": true, "description": "Approximate count of rows in this table"}, "num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 170.0, "include": true, "description": "Approximate size of table as reported by BigQuery"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.apple_search_ads_integration_tests.ad_report_data"}, "seed.apple_search_ads_integration_tests.campaign_history_data": {"metadata": {"type": "table", "schema": "apple_search_ads_integration_tests", "name": "campaign_history_data", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"id": {"type": "INT64", "index": 1, "name": "id", "comment": null}, "modification_time": {"type": "TIMESTAMP", "index": 2, "name": "modification_time", "comment": null}, "adam_id": {"type": "INT64", "index": 3, "name": "adam_id", "comment": null}, "budget_amount": {"type": "INT64", "index": 4, "name": "budget_amount", "comment": null}, "budget_currency": {"type": "STRING", "index": 5, "name": "budget_currency", "comment": null}, "budget_orders": {"type": "STRING", "index": 6, "name": "budget_orders", "comment": null}, "daily_budget_amount": {"type": "INT64", "index": 7, "name": "daily_budget_amount", "comment": null}, "daily_budget_currency": {"type": "STRING", "index": 8, "name": "daily_budget_currency", "comment": null}, "deleted": {"type": "BOOL", "index": 9, "name": "deleted", "comment": null}, "end_time": {"type": "TIMESTAMP", "index": 10, "name": "end_time", "comment": null}, "loc_invoice_detail_buyer_email": {"type": "INT64", "index": 11, "name": "loc_invoice_detail_buyer_email", "comment": null}, "loc_invoice_detail_buyer_name": {"type": "INT64", "index": 12, "name": "loc_invoice_detail_buyer_name", "comment": null}, "loc_invoice_detail_client_name": {"type": "INT64", "index": 13, "name": "loc_invoice_detail_client_name", "comment": null}, "loc_invoice_detail_order_number": {"type": "INT64", "index": 14, "name": "loc_invoice_detail_order_number", "comment": null}, "name": {"type": "STRING", "index": 15, "name": "name", "comment": null}, "organization_id": {"type": "INT64", "index": 16, "name": "organization_id", "comment": null}, "payment_model": {"type": "STRING", "index": 17, "name": "payment_model", "comment": null}, "serving_state_reasons": {"type": "STRING", "index": 18, "name": "serving_state_reasons", "comment": null}, "serving_status": {"type": "STRING", "index": 19, "name": "serving_status", "comment": null}, "start_time": {"type": "TIMESTAMP", "index": 20, "name": "start_time", "comment": null}, "status": {"type": "STRING", "index": 21, "name": "status", "comment": null}}, "stats": {"num_rows": {"id": "num_rows", "label": "# Rows", "value": 3.0, "include": true, "description": "Approximate count of rows in this table"}, "num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 419.0, "include": true, "description": "Approximate size of table as reported by BigQuery"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.apple_search_ads_integration_tests.campaign_history_data"}, "seed.apple_search_ads_integration_tests.campaign_report_data": {"metadata": {"type": "table", "schema": "apple_search_ads_integration_tests", "name": "campaign_report_data", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"date": {"type": "DATE", "index": 1, "name": "date", "comment": null}, "id": {"type": "INT64", "index": 2, "name": "id", "comment": null}, "avg_cpa_amount": {"type": "FLOAT64", "index": 3, "name": "avg_cpa_amount", "comment": null}, "avg_cpa_currency": {"type": "STRING", "index": 4, "name": "avg_cpa_currency", "comment": null}, "avg_cpt_amount": {"type": "FLOAT64", "index": 5, "name": "avg_cpt_amount", "comment": null}, "avg_cpt_currency": {"type": "STRING", "index": 6, "name": "avg_cpt_currency", "comment": null}, "conversion_rate": {"type": "FLOAT64", "index": 7, "name": "conversion_rate", "comment": null}, "conversions": {"type": "INT64", "index": 8, "name": "conversions", "comment": null}, "impressions": {"type": "INT64", "index": 9, "name": "impressions", "comment": null}, "lat_off_installs": {"type": "INT64", "index": 10, "name": "lat_off_installs", "comment": null}, "lat_on_installs": {"type": "INT64", "index": 11, "name": "lat_on_installs", "comment": null}, "local_spend_amount": {"type": "FLOAT64", "index": 12, "name": "local_spend_amount", "comment": null}, "local_spend_currency": {"type": "STRING", "index": 13, "name": "local_spend_currency", "comment": null}, "new_downloads": {"type": "INT64", "index": 14, "name": "new_downloads", "comment": null}, "redownloads": {"type": "INT64", "index": 15, "name": "redownloads", "comment": null}, "tap_through_rate": {"type": "FLOAT64", "index": 16, "name": "tap_through_rate", "comment": null}, "taps": {"type": "INT64", "index": 17, "name": "taps", "comment": null}}, "stats": {"num_rows": {"id": "num_rows", "label": "# Rows", "value": 12.0, "include": true, "description": "Approximate count of rows in this table"}, "num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 1524.0, "include": true, "description": "Approximate size of table as reported by BigQuery"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.apple_search_ads_integration_tests.campaign_report_data"}, "seed.apple_search_ads_integration_tests.keyword_history_data": {"metadata": {"type": "table", "schema": "apple_search_ads_integration_tests", "name": "keyword_history_data", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"id": {"type": "INT64", "index": 1, "name": "id", "comment": null}, "modification_time": {"type": "TIMESTAMP", "index": 2, "name": "modification_time", "comment": null}, "ad_group_id": {"type": "INT64", "index": 3, "name": "ad_group_id", "comment": null}, "bid_amount": {"type": "FLOAT64", "index": 4, "name": "bid_amount", "comment": null}, "bid_currency": {"type": "STRING", "index": 5, "name": "bid_currency", "comment": null}, "campaign_id": {"type": "INT64", "index": 6, "name": "campaign_id", "comment": null}, "deleted": {"type": "BOOL", "index": 7, "name": "deleted", "comment": null}, "match_type": {"type": "STRING", "index": 8, "name": "match_type", "comment": null}, "status": {"type": "STRING", "index": 9, "name": "status", "comment": null}, "text": {"type": "STRING", "index": 10, "name": "text", "comment": null}}, "stats": {"num_rows": {"id": "num_rows", "label": "# Rows", "value": 16.0, "include": true, "description": "Approximate count of rows in this table"}, "num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 1151.0, "include": true, "description": "Approximate size of table as reported by BigQuery"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.apple_search_ads_integration_tests.keyword_history_data"}, "seed.apple_search_ads_integration_tests.ad_history_data": {"metadata": {"type": "table", "schema": "apple_search_ads_integration_tests", "name": "ad_history_data", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"creation_time": {"type": "TIMESTAMP", "index": 1, "name": "creation_time", "comment": null}, "modification_time": {"type": "TIMESTAMP", "index": 2, "name": "modification_time", "comment": null}, "org_id": {"type": "INT64", "index": 3, "name": "org_id", "comment": null}, "campaign_id": {"type": "INT64", "index": 4, "name": "campaign_id", "comment": null}, "ad_group_id": {"type": "INT64", "index": 5, "name": "ad_group_id", "comment": null}, "name": {"type": "STRING", "index": 6, "name": "name", "comment": null}, "id": {"type": "INT64", "index": 7, "name": "id", "comment": null}, "creative_id": {"type": "INT64", "index": 8, "name": "creative_id", "comment": null}, "creative_type": {"type": "STRING", "index": 9, "name": "creative_type", "comment": null}, "status": {"type": "STRING", "index": 10, "name": "status", "comment": null}}, "stats": {"num_rows": {"id": "num_rows", "label": "# Rows", "value": 1.0, "include": true, "description": "Approximate count of rows in this table"}, "num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 101.0, "include": true, "description": "Approximate size of table as reported by BigQuery"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.apple_search_ads_integration_tests.ad_history_data"}, "seed.apple_search_ads_integration_tests.keyword_report_data": {"metadata": {"type": "table", "schema": "apple_search_ads_integration_tests", "name": "keyword_report_data", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"date": {"type": "DATE", "index": 1, "name": "date", "comment": null}, "id": {"type": "INT64", "index": 2, "name": "id", "comment": null}, "avg_cpa_amount": {"type": "FLOAT64", "index": 3, "name": "avg_cpa_amount", "comment": null}, "avg_cpa_currency": {"type": "STRING", "index": 4, "name": "avg_cpa_currency", "comment": null}, "avg_cpt_amount": {"type": "FLOAT64", "index": 5, "name": "avg_cpt_amount", "comment": null}, "avg_cpt_currency": {"type": "STRING", "index": 6, "name": "avg_cpt_currency", "comment": null}, "conversion_rate": {"type": "FLOAT64", "index": 7, "name": "conversion_rate", "comment": null}, "conversions": {"type": "INT64", "index": 8, "name": "conversions", "comment": null}, "impressions": {"type": "INT64", "index": 9, "name": "impressions", "comment": null}, "lat_off_installs": {"type": "INT64", "index": 10, "name": "lat_off_installs", "comment": null}, "lat_on_installs": {"type": "INT64", "index": 11, "name": "lat_on_installs", "comment": null}, "local_spend_amount": {"type": "FLOAT64", "index": 12, "name": "local_spend_amount", "comment": null}, "local_spend_currency": {"type": "STRING", "index": 13, "name": "local_spend_currency", "comment": null}, "new_downloads": {"type": "INT64", "index": 14, "name": "new_downloads", "comment": null}, "redownloads": {"type": "INT64", "index": 15, "name": "redownloads", "comment": null}, "tap_through_rate": {"type": "FLOAT64", "index": 16, "name": "tap_through_rate", "comment": null}, "taps": {"type": "INT64", "index": 17, "name": "taps", "comment": null}}, "stats": {"num_rows": {"id": "num_rows", "label": "# Rows", "value": 99.0, "include": true, "description": "Approximate count of rows in this table"}, "num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 12573.0, "include": true, "description": "Approximate size of table as reported by BigQuery"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.apple_search_ads_integration_tests.keyword_report_data"}, "seed.apple_search_ads_integration_tests.ad_group_history_data": {"metadata": {"type": "table", "schema": "apple_search_ads_integration_tests", "name": "ad_group_history_data", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"id": {"type": "INT64", "index": 1, "name": "id", "comment": null}, "modification_time": {"type": "TIMESTAMP", "index": 2, "name": "modification_time", "comment": null}, "automated_keywords_opt_in": {"type": "BOOL", "index": 3, "name": "automated_keywords_opt_in", "comment": null}, "campaign_id": {"type": "INT64", "index": 4, "name": "campaign_id", "comment": null}, "cpa_goal_amount": {"type": "INT64", "index": 5, "name": "cpa_goal_amount", "comment": null}, "cpa_goal_currency": {"type": "INT64", "index": 6, "name": "cpa_goal_currency", "comment": null}, "default_cpc_bid_amount": {"type": "INT64", "index": 7, "name": "default_cpc_bid_amount", "comment": null}, "default_cpc_bid_currency": {"type": "INT64", "index": 8, "name": "default_cpc_bid_currency", "comment": null}, "deleted": {"type": "BOOL", "index": 9, "name": "deleted", "comment": null}, "end_time": {"type": "TIMESTAMP", "index": 10, "name": "end_time", "comment": null}, "name": {"type": "STRING", "index": 11, "name": "name", "comment": null}, "organization_id": {"type": "INT64", "index": 12, "name": "organization_id", "comment": null}, "serving_state_reasons": {"type": "INT64", "index": 13, "name": "serving_state_reasons", "comment": null}, "serving_status": {"type": "STRING", "index": 14, "name": "serving_status", "comment": null}, "start_time": {"type": "TIMESTAMP", "index": 15, "name": "start_time", "comment": null}, "status": {"type": "STRING", "index": 16, "name": "status", "comment": null}, "storefronts": {"type": "INT64", "index": 17, "name": "storefronts", "comment": null}}, "stats": {"num_rows": {"id": "num_rows", "label": "# Rows", "value": 4.0, "include": true, "description": "Approximate count of rows in this table"}, "num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 334.0, "include": true, "description": "Approximate size of table as reported by BigQuery"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.apple_search_ads_integration_tests.ad_group_history_data"}, "seed.apple_search_ads_integration_tests.organization_data": {"metadata": {"type": "table", "schema": "apple_search_ads_integration_tests", "name": "organization_data", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"id": {"type": "INT64", "index": 1, "name": "id", "comment": null}, "currency": {"type": "STRING", "index": 2, "name": "currency", "comment": null}, "name": {"type": "STRING", "index": 3, "name": "name", "comment": null}, "payment_model": {"type": "STRING", "index": 4, "name": "payment_model", "comment": null}, "role_names": {"type": "STRING", "index": 5, "name": "role_names", "comment": null}, "time_zone": {"type": "STRING", "index": 6, "name": "time_zone", "comment": null}}, "stats": {"num_rows": {"id": "num_rows", "label": "# Rows", "value": 2.0, "include": true, "description": "Approximate count of rows in this table"}, "num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 132.0, "include": true, "description": "Approximate size of table as reported by BigQuery"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.apple_search_ads_integration_tests.organization_data"}}, "sources": {"source.apple_search_ads_source.apple_search_ads.ad_group_report": {"metadata": {"type": "table", "schema": "apple_search_ads_integration_tests", "name": "ad_group_report_data", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"ad_group_id": {"type": "INT64", "index": 1, "name": "ad_group_id", "comment": null}, "date": {"type": "DATE", "index": 2, "name": "date", "comment": null}, "avg_cpa_amount": {"type": "FLOAT64", "index": 3, "name": "avg_cpa_amount", "comment": null}, "avg_cpa_currency": {"type": "STRING", "index": 4, "name": "avg_cpa_currency", "comment": null}, "avg_cpt_amount": {"type": "FLOAT64", "index": 5, "name": "avg_cpt_amount", "comment": null}, "avg_cpt_currency": {"type": "STRING", "index": 6, "name": "avg_cpt_currency", "comment": null}, "conversion_rate": {"type": "FLOAT64", "index": 7, "name": "conversion_rate", "comment": null}, "conversions": {"type": "INT64", "index": 8, "name": "conversions", "comment": null}, "impressions": {"type": "INT64", "index": 9, "name": "impressions", "comment": null}, "lat_off_installs": {"type": "INT64", "index": 10, "name": "lat_off_installs", "comment": null}, "lat_on_installs": {"type": "INT64", "index": 11, "name": "lat_on_installs", "comment": null}, "local_spend_amount": {"type": "FLOAT64", "index": 12, "name": "local_spend_amount", "comment": null}, "local_spend_currency": {"type": "STRING", "index": 13, "name": "local_spend_currency", "comment": null}, "new_downloads": {"type": "INT64", "index": 14, "name": "new_downloads", "comment": null}, "redownloads": {"type": "INT64", "index": 15, "name": "redownloads", "comment": null}, "tap_through_rate": {"type": "FLOAT64", "index": 16, "name": "tap_through_rate", "comment": null}, "taps": {"type": "INT64", "index": 17, "name": "taps", "comment": null}}, "stats": {"num_rows": {"id": "num_rows", "label": "# Rows", "value": 13.0, "include": true, "description": "Approximate count of rows in this table"}, "num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 1651.0, "include": true, "description": "Approximate size of table as reported by BigQuery"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.apple_search_ads_source.apple_search_ads.ad_group_report"}, "source.apple_search_ads_source.apple_search_ads.search_term_report": {"metadata": {"type": "table", "schema": "apple_search_ads_integration_tests", "name": "search_term_report_data", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"_fivetran_id": {"type": "STRING", "index": 1, "name": "_fivetran_id", "comment": null}, "ad_group_id": {"type": "INT64", "index": 2, "name": "ad_group_id", "comment": null}, "campaign_id": {"type": "INT64", "index": 3, "name": "campaign_id", "comment": null}, "date": {"type": "DATE", "index": 4, "name": "date", "comment": null}, "ad_group_deleted": {"type": "BOOL", "index": 5, "name": "ad_group_deleted", "comment": null}, "ad_group_name": {"type": "STRING", "index": 6, "name": "ad_group_name", "comment": null}, "avg_cpa_amount": {"type": "FLOAT64", "index": 7, "name": "avg_cpa_amount", "comment": null}, "avg_cpa_currency": {"type": "STRING", "index": 8, "name": "avg_cpa_currency", "comment": null}, "avg_cpt_amount": {"type": "FLOAT64", "index": 9, "name": "avg_cpt_amount", "comment": null}, "avg_cpt_currency": {"type": "STRING", "index": 10, "name": "avg_cpt_currency", "comment": null}, "bid_amount_amount": {"type": "FLOAT64", "index": 11, "name": "bid_amount_amount", "comment": null}, "bid_amount_currency": {"type": "STRING", "index": 12, "name": "bid_amount_currency", "comment": null}, "conversion_rate": {"type": "FLOAT64", "index": 13, "name": "conversion_rate", "comment": null}, "conversions": {"type": "INT64", "index": 14, "name": "conversions", "comment": null}, "deleted": {"type": "BOOL", "index": 15, "name": "deleted", "comment": null}, "impressions": {"type": "INT64", "index": 16, "name": "impressions", "comment": null}, "keyword": {"type": "STRING", "index": 17, "name": "keyword", "comment": null}, "keyword_display_status": {"type": "STRING", "index": 18, "name": "keyword_display_status", "comment": null}, "keyword_id": {"type": "INT64", "index": 19, "name": "keyword_id", "comment": null}, "lat_off_installs": {"type": "INT64", "index": 20, "name": "lat_off_installs", "comment": null}, "lat_on_installs": {"type": "INT64", "index": 21, "name": "lat_on_installs", "comment": null}, "local_spend_amount": {"type": "FLOAT64", "index": 22, "name": "local_spend_amount", "comment": null}, "local_spend_currency": {"type": "STRING", "index": 23, "name": "local_spend_currency", "comment": null}, "match_type": {"type": "STRING", "index": 24, "name": "match_type", "comment": null}, "new_downloads": {"type": "INT64", "index": 25, "name": "new_downloads", "comment": null}, "redownloads": {"type": "INT64", "index": 26, "name": "redownloads", "comment": null}, "search_term_source": {"type": "STRING", "index": 27, "name": "search_term_source", "comment": null}, "search_term_text": {"type": "STRING", "index": 28, "name": "search_term_text", "comment": null}, "tap_through_rate": {"type": "FLOAT64", "index": 29, "name": "tap_through_rate", "comment": null}, "taps": {"type": "INT64", "index": 30, "name": "taps", "comment": null}}, "stats": {"num_rows": {"id": "num_rows", "label": "# Rows", "value": 150.0, "include": true, "description": "Approximate count of rows in this table"}, "num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 35485.0, "include": true, "description": "Approximate size of table as reported by BigQuery"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.apple_search_ads_source.apple_search_ads.search_term_report"}, "source.apple_search_ads_source.apple_search_ads.ad_level_report": {"metadata": {"type": "table", "schema": "apple_search_ads_integration_tests", "name": "ad_report_data", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"date": {"type": "DATE", "index": 1, "name": "date", "comment": null}, "_fivetran_synced": {"type": "TIMESTAMP", "index": 2, "name": "_fivetran_synced", "comment": null}, "campaign_id": {"type": "INT64", "index": 3, "name": "campaign_id", "comment": null}, "ad_group_id": {"type": "INT64", "index": 4, "name": "ad_group_id", "comment": null}, "ad_id": {"type": "INT64", "index": 5, "name": "ad_id", "comment": null}, "impressions": {"type": "INT64", "index": 6, "name": "impressions", "comment": null}, "local_spend_amount": {"type": "FLOAT64", "index": 7, "name": "local_spend_amount", "comment": null}, "local_spend_currency": {"type": "STRING", "index": 8, "name": "local_spend_currency", "comment": null}, "new_downloads": {"type": "INT64", "index": 9, "name": "new_downloads", "comment": null}, "redownloads": {"type": "INT64", "index": 10, "name": "redownloads", "comment": null}, "taps": {"type": "INT64", "index": 11, "name": "taps", "comment": null}}, "stats": {"num_rows": {"id": "num_rows", "label": "# Rows", "value": 2.0, "include": true, "description": "Approximate count of rows in this table"}, "num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 170.0, "include": true, "description": "Approximate size of table as reported by BigQuery"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.apple_search_ads_source.apple_search_ads.ad_level_report"}, "source.apple_search_ads_source.apple_search_ads.campaign_history": {"metadata": {"type": "table", "schema": "apple_search_ads_integration_tests", "name": "campaign_history_data", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"id": {"type": "INT64", "index": 1, "name": "id", "comment": null}, "modification_time": {"type": "TIMESTAMP", "index": 2, "name": "modification_time", "comment": null}, "adam_id": {"type": "INT64", "index": 3, "name": "adam_id", "comment": null}, "budget_amount": {"type": "INT64", "index": 4, "name": "budget_amount", "comment": null}, "budget_currency": {"type": "STRING", "index": 5, "name": "budget_currency", "comment": null}, "budget_orders": {"type": "STRING", "index": 6, "name": "budget_orders", "comment": null}, "daily_budget_amount": {"type": "INT64", "index": 7, "name": "daily_budget_amount", "comment": null}, "daily_budget_currency": {"type": "STRING", "index": 8, "name": "daily_budget_currency", "comment": null}, "deleted": {"type": "BOOL", "index": 9, "name": "deleted", "comment": null}, "end_time": {"type": "TIMESTAMP", "index": 10, "name": "end_time", "comment": null}, "loc_invoice_detail_buyer_email": {"type": "INT64", "index": 11, "name": "loc_invoice_detail_buyer_email", "comment": null}, "loc_invoice_detail_buyer_name": {"type": "INT64", "index": 12, "name": "loc_invoice_detail_buyer_name", "comment": null}, "loc_invoice_detail_client_name": {"type": "INT64", "index": 13, "name": "loc_invoice_detail_client_name", "comment": null}, "loc_invoice_detail_order_number": {"type": "INT64", "index": 14, "name": "loc_invoice_detail_order_number", "comment": null}, "name": {"type": "STRING", "index": 15, "name": "name", "comment": null}, "organization_id": {"type": "INT64", "index": 16, "name": "organization_id", "comment": null}, "payment_model": {"type": "STRING", "index": 17, "name": "payment_model", "comment": null}, "serving_state_reasons": {"type": "STRING", "index": 18, "name": "serving_state_reasons", "comment": null}, "serving_status": {"type": "STRING", "index": 19, "name": "serving_status", "comment": null}, "start_time": {"type": "TIMESTAMP", "index": 20, "name": "start_time", "comment": null}, "status": {"type": "STRING", "index": 21, "name": "status", "comment": null}}, "stats": {"num_rows": {"id": "num_rows", "label": "# Rows", "value": 3.0, "include": true, "description": "Approximate count of rows in this table"}, "num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 419.0, "include": true, "description": "Approximate size of table as reported by BigQuery"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.apple_search_ads_source.apple_search_ads.campaign_history"}, "source.apple_search_ads_source.apple_search_ads.campaign_report": {"metadata": {"type": "table", "schema": "apple_search_ads_integration_tests", "name": "campaign_report_data", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"date": {"type": "DATE", "index": 1, "name": "date", "comment": null}, "id": {"type": "INT64", "index": 2, "name": "id", "comment": null}, "avg_cpa_amount": {"type": "FLOAT64", "index": 3, "name": "avg_cpa_amount", "comment": null}, "avg_cpa_currency": {"type": "STRING", "index": 4, "name": "avg_cpa_currency", "comment": null}, "avg_cpt_amount": {"type": "FLOAT64", "index": 5, "name": "avg_cpt_amount", "comment": null}, "avg_cpt_currency": {"type": "STRING", "index": 6, "name": "avg_cpt_currency", "comment": null}, "conversion_rate": {"type": "FLOAT64", "index": 7, "name": "conversion_rate", "comment": null}, "conversions": {"type": "INT64", "index": 8, "name": "conversions", "comment": null}, "impressions": {"type": "INT64", "index": 9, "name": "impressions", "comment": null}, "lat_off_installs": {"type": "INT64", "index": 10, "name": "lat_off_installs", "comment": null}, "lat_on_installs": {"type": "INT64", "index": 11, "name": "lat_on_installs", "comment": null}, "local_spend_amount": {"type": "FLOAT64", "index": 12, "name": "local_spend_amount", "comment": null}, "local_spend_currency": {"type": "STRING", "index": 13, "name": "local_spend_currency", "comment": null}, "new_downloads": {"type": "INT64", "index": 14, "name": "new_downloads", "comment": null}, "redownloads": {"type": "INT64", "index": 15, "name": "redownloads", "comment": null}, "tap_through_rate": {"type": "FLOAT64", "index": 16, "name": "tap_through_rate", "comment": null}, "taps": {"type": "INT64", "index": 17, "name": "taps", "comment": null}}, "stats": {"num_rows": {"id": "num_rows", "label": "# Rows", "value": 12.0, "include": true, "description": "Approximate count of rows in this table"}, "num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 1524.0, "include": true, "description": "Approximate size of table as reported by BigQuery"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.apple_search_ads_source.apple_search_ads.campaign_report"}, "source.apple_search_ads_source.apple_search_ads.keyword_history": {"metadata": {"type": "table", "schema": "apple_search_ads_integration_tests", "name": "keyword_history_data", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"id": {"type": "INT64", "index": 1, "name": "id", "comment": null}, "modification_time": {"type": "TIMESTAMP", "index": 2, "name": "modification_time", "comment": null}, "ad_group_id": {"type": "INT64", "index": 3, "name": "ad_group_id", "comment": null}, "bid_amount": {"type": "FLOAT64", "index": 4, "name": "bid_amount", "comment": null}, "bid_currency": {"type": "STRING", "index": 5, "name": "bid_currency", "comment": null}, "campaign_id": {"type": "INT64", "index": 6, "name": "campaign_id", "comment": null}, "deleted": {"type": "BOOL", "index": 7, "name": "deleted", "comment": null}, "match_type": {"type": "STRING", "index": 8, "name": "match_type", "comment": null}, "status": {"type": "STRING", "index": 9, "name": "status", "comment": null}, "text": {"type": "STRING", "index": 10, "name": "text", "comment": null}}, "stats": {"num_rows": {"id": "num_rows", "label": "# Rows", "value": 16.0, "include": true, "description": "Approximate count of rows in this table"}, "num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 1151.0, "include": true, "description": "Approximate size of table as reported by BigQuery"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.apple_search_ads_source.apple_search_ads.keyword_history"}, "source.apple_search_ads_source.apple_search_ads.ad_history": {"metadata": {"type": "table", "schema": "apple_search_ads_integration_tests", "name": "ad_history_data", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"creation_time": {"type": "TIMESTAMP", "index": 1, "name": "creation_time", "comment": null}, "modification_time": {"type": "TIMESTAMP", "index": 2, "name": "modification_time", "comment": null}, "org_id": {"type": "INT64", "index": 3, "name": "org_id", "comment": null}, "campaign_id": {"type": "INT64", "index": 4, "name": "campaign_id", "comment": null}, "ad_group_id": {"type": "INT64", "index": 5, "name": "ad_group_id", "comment": null}, "name": {"type": "STRING", "index": 6, "name": "name", "comment": null}, "id": {"type": "INT64", "index": 7, "name": "id", "comment": null}, "creative_id": {"type": "INT64", "index": 8, "name": "creative_id", "comment": null}, "creative_type": {"type": "STRING", "index": 9, "name": "creative_type", "comment": null}, "status": {"type": "STRING", "index": 10, "name": "status", "comment": null}}, "stats": {"num_rows": {"id": "num_rows", "label": "# Rows", "value": 1.0, "include": true, "description": "Approximate count of rows in this table"}, "num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 101.0, "include": true, "description": "Approximate size of table as reported by BigQuery"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.apple_search_ads_source.apple_search_ads.ad_history"}, "source.apple_search_ads_source.apple_search_ads.keyword_report": {"metadata": {"type": "table", "schema": "apple_search_ads_integration_tests", "name": "keyword_report_data", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"date": {"type": "DATE", "index": 1, "name": "date", "comment": null}, "id": {"type": "INT64", "index": 2, "name": "id", "comment": null}, "avg_cpa_amount": {"type": "FLOAT64", "index": 3, "name": "avg_cpa_amount", "comment": null}, "avg_cpa_currency": {"type": "STRING", "index": 4, "name": "avg_cpa_currency", "comment": null}, "avg_cpt_amount": {"type": "FLOAT64", "index": 5, "name": "avg_cpt_amount", "comment": null}, "avg_cpt_currency": {"type": "STRING", "index": 6, "name": "avg_cpt_currency", "comment": null}, "conversion_rate": {"type": "FLOAT64", "index": 7, "name": "conversion_rate", "comment": null}, "conversions": {"type": "INT64", "index": 8, "name": "conversions", "comment": null}, "impressions": {"type": "INT64", "index": 9, "name": "impressions", "comment": null}, "lat_off_installs": {"type": "INT64", "index": 10, "name": "lat_off_installs", "comment": null}, "lat_on_installs": {"type": "INT64", "index": 11, "name": "lat_on_installs", "comment": null}, "local_spend_amount": {"type": "FLOAT64", "index": 12, "name": "local_spend_amount", "comment": null}, "local_spend_currency": {"type": "STRING", "index": 13, "name": "local_spend_currency", "comment": null}, "new_downloads": {"type": "INT64", "index": 14, "name": "new_downloads", "comment": null}, "redownloads": {"type": "INT64", "index": 15, "name": "redownloads", "comment": null}, "tap_through_rate": {"type": "FLOAT64", "index": 16, "name": "tap_through_rate", "comment": null}, "taps": {"type": "INT64", "index": 17, "name": "taps", "comment": null}}, "stats": {"num_rows": {"id": "num_rows", "label": "# Rows", "value": 99.0, "include": true, "description": "Approximate count of rows in this table"}, "num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 12573.0, "include": true, "description": "Approximate size of table as reported by BigQuery"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.apple_search_ads_source.apple_search_ads.keyword_report"}, "source.apple_search_ads_source.apple_search_ads.ad_group_history": {"metadata": {"type": "table", "schema": "apple_search_ads_integration_tests", "name": "ad_group_history_data", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"id": {"type": "INT64", "index": 1, "name": "id", "comment": null}, "modification_time": {"type": "TIMESTAMP", "index": 2, "name": "modification_time", "comment": null}, "automated_keywords_opt_in": {"type": "BOOL", "index": 3, "name": "automated_keywords_opt_in", "comment": null}, "campaign_id": {"type": "INT64", "index": 4, "name": "campaign_id", "comment": null}, "cpa_goal_amount": {"type": "INT64", "index": 5, "name": "cpa_goal_amount", "comment": null}, "cpa_goal_currency": {"type": "INT64", "index": 6, "name": "cpa_goal_currency", "comment": null}, "default_cpc_bid_amount": {"type": "INT64", "index": 7, "name": "default_cpc_bid_amount", "comment": null}, "default_cpc_bid_currency": {"type": "INT64", "index": 8, "name": "default_cpc_bid_currency", "comment": null}, "deleted": {"type": "BOOL", "index": 9, "name": "deleted", "comment": null}, "end_time": {"type": "TIMESTAMP", "index": 10, "name": "end_time", "comment": null}, "name": {"type": "STRING", "index": 11, "name": "name", "comment": null}, "organization_id": {"type": "INT64", "index": 12, "name": "organization_id", "comment": null}, "serving_state_reasons": {"type": "INT64", "index": 13, "name": "serving_state_reasons", "comment": null}, "serving_status": {"type": "STRING", "index": 14, "name": "serving_status", "comment": null}, "start_time": {"type": "TIMESTAMP", "index": 15, "name": "start_time", "comment": null}, "status": {"type": "STRING", "index": 16, "name": "status", "comment": null}, "storefronts": {"type": "INT64", "index": 17, "name": "storefronts", "comment": null}}, "stats": {"num_rows": {"id": "num_rows", "label": "# Rows", "value": 4.0, "include": true, "description": "Approximate count of rows in this table"}, "num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 334.0, "include": true, "description": "Approximate size of table as reported by BigQuery"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.apple_search_ads_source.apple_search_ads.ad_group_history"}, "source.apple_search_ads_source.apple_search_ads.organization": {"metadata": {"type": "table", "schema": "apple_search_ads_integration_tests", "name": "organization_data", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"id": {"type": "INT64", "index": 1, "name": "id", "comment": null}, "currency": {"type": "STRING", "index": 2, "name": "currency", "comment": null}, "name": {"type": "STRING", "index": 3, "name": "name", "comment": null}, "payment_model": {"type": "STRING", "index": 4, "name": "payment_model", "comment": null}, "role_names": {"type": "STRING", "index": 5, "name": "role_names", "comment": null}, "time_zone": {"type": "STRING", "index": 6, "name": "time_zone", "comment": null}}, "stats": {"num_rows": {"id": "num_rows", "label": "# Rows", "value": 2.0, "include": true, "description": "Approximate count of rows in this table"}, "num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 132.0, "include": true, "description": "Approximate size of table as reported by BigQuery"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.apple_search_ads_source.apple_search_ads.organization"}}, "errors": null} \ No newline at end of file diff --git a/docs/index.html b/docs/index.html index 0c4d0ec..182b6b4 100644 --- a/docs/index.html +++ b/docs/index.html @@ -24,7 +24,7 @@
icons
- diff --git a/docs/manifest.json b/docs/manifest.json index ba6dfb2..2660675 100644 --- a/docs/manifest.json +++ b/docs/manifest.json @@ -1 +1 @@ -{"metadata": {"dbt_schema_version": "https://schemas.getdbt.com/dbt/manifest/v4.json", "dbt_version": "1.0.4", "generated_at": "2022-08-26T21:15:20.244649Z", "invocation_id": "367dbfac-ed32-4d44-bb84-cf72665daa06", "env": {}, "project_id": "b8a2464c562afb40124f0d47d8c7adc5", "user_id": "8929baf0-9bc1-477e-9a57-eb8b0db4da62", "send_anonymous_usage_stats": true, "adapter_type": "postgres"}, "nodes": {"seed.apple_search_ads_integration_tests.ad_group_report_data": {"raw_sql": "", "compiled": true, "resource_type": "seed", "depends_on": {"macros": [], "nodes": []}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "materialized": "seed", "persist_docs": {}, "quoting": {}, "column_types": {"modification_time": "timestamp", "start_time": "timestamp", "end_time": "timestamp", "creation_time": "timestamp", "_fivetran_synced": "timestamp"}, "full_refresh": null, "on_schema_change": "ignore", "quote_columns": false, "post-hook": [], "pre-hook": []}, "database": "postgres", "schema": "apple_search_ads_integration_tests", "fqn": ["apple_search_ads_integration_tests", "ad_group_report_data"], "unique_id": "seed.apple_search_ads_integration_tests.ad_group_report_data", "package_name": "apple_search_ads_integration_tests", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests", "path": "ad_group_report_data.csv", "original_file_path": "seeds/ad_group_report_data.csv", "name": "ad_group_report_data", "alias": "ad_group_report_data", "checksum": {"name": "sha256", "checksum": "135ee77ac9c3aa146d4f0281b04312c1034c271276f215b27145bb99f83534f5"}, "tags": [], "refs": [], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": null, "build_path": null, "deferred": false, "unrendered_config": {"quote_columns": "{{ true if target.type == 'redshift' else false }}", "column_types": {"modification_time": "timestamp", "start_time": "timestamp", "end_time": "timestamp", "creation_time": "timestamp", "_fivetran_synced": "timestamp"}}, "created_at": 1661548508.768648, "compiled_sql": "", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "\"postgres\".\"apple_search_ads_integration_tests\".\"ad_group_report_data\""}, "seed.apple_search_ads_integration_tests.ad_report_data": {"raw_sql": "", "compiled": true, "resource_type": "seed", "depends_on": {"macros": [], "nodes": []}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "materialized": "seed", "persist_docs": {}, "quoting": {}, "column_types": {"modification_time": "timestamp", "start_time": "timestamp", "end_time": "timestamp", "creation_time": "timestamp", "_fivetran_synced": "timestamp"}, "full_refresh": null, "on_schema_change": "ignore", "quote_columns": false, "post-hook": [], "pre-hook": []}, "database": "postgres", "schema": "apple_search_ads_integration_tests", "fqn": ["apple_search_ads_integration_tests", "ad_report_data"], "unique_id": "seed.apple_search_ads_integration_tests.ad_report_data", "package_name": "apple_search_ads_integration_tests", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests", "path": "ad_report_data.csv", "original_file_path": "seeds/ad_report_data.csv", "name": "ad_report_data", "alias": "ad_report_data", "checksum": {"name": "sha256", "checksum": "beef859bd11dd339082a3e8d23414c5da7e30ae75ade28736a3dbdf292627708"}, "tags": [], "refs": [], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": null, "build_path": null, "deferred": false, "unrendered_config": {"quote_columns": "{{ true if target.type == 'redshift' else false }}", "column_types": {"modification_time": "timestamp", "start_time": "timestamp", "end_time": "timestamp", "creation_time": "timestamp", "_fivetran_synced": "timestamp"}}, "created_at": 1661548508.7745469, "compiled_sql": "", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "\"postgres\".\"apple_search_ads_integration_tests\".\"ad_report_data\""}, "seed.apple_search_ads_integration_tests.keyword_report_data": {"raw_sql": "", "compiled": true, "resource_type": "seed", "depends_on": {"macros": [], "nodes": []}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "materialized": "seed", "persist_docs": {}, "quoting": {}, "column_types": {"modification_time": "timestamp", "start_time": "timestamp", "end_time": "timestamp", "creation_time": "timestamp", "_fivetran_synced": "timestamp"}, "full_refresh": null, "on_schema_change": "ignore", "quote_columns": false, "post-hook": [], "pre-hook": []}, "database": "postgres", "schema": "apple_search_ads_integration_tests", "fqn": ["apple_search_ads_integration_tests", "keyword_report_data"], "unique_id": "seed.apple_search_ads_integration_tests.keyword_report_data", "package_name": "apple_search_ads_integration_tests", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests", "path": "keyword_report_data.csv", "original_file_path": "seeds/keyword_report_data.csv", "name": "keyword_report_data", "alias": "keyword_report_data", "checksum": {"name": "sha256", "checksum": "6aafe7098ea6f18764856a6631b190de106462f83f8bb1d3c8fb91e2d3cfffee"}, "tags": [], "refs": [], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": null, "build_path": null, "deferred": false, "unrendered_config": {"quote_columns": "{{ true if target.type == 'redshift' else false }}", "column_types": {"modification_time": "timestamp", "start_time": "timestamp", "end_time": "timestamp", "creation_time": "timestamp", "_fivetran_synced": "timestamp"}}, "created_at": 1661548508.7755609, "compiled_sql": "", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "\"postgres\".\"apple_search_ads_integration_tests\".\"keyword_report_data\""}, "seed.apple_search_ads_integration_tests.ad_history_data": {"raw_sql": "", "compiled": true, "resource_type": "seed", "depends_on": {"macros": [], "nodes": []}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "materialized": "seed", "persist_docs": {}, "quoting": {}, "column_types": {"modification_time": "timestamp", "start_time": "timestamp", "end_time": "timestamp", "creation_time": "timestamp", "_fivetran_synced": "timestamp"}, "full_refresh": null, "on_schema_change": "ignore", "quote_columns": false, "post-hook": [], "pre-hook": []}, "database": "postgres", "schema": "apple_search_ads_integration_tests", "fqn": ["apple_search_ads_integration_tests", "ad_history_data"], "unique_id": "seed.apple_search_ads_integration_tests.ad_history_data", "package_name": "apple_search_ads_integration_tests", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests", "path": "ad_history_data.csv", "original_file_path": "seeds/ad_history_data.csv", "name": "ad_history_data", "alias": "ad_history_data", "checksum": {"name": "sha256", "checksum": "6b7e388b2b1ac23dd3f2e0cc1a781099a525e921a36da2fe83f52bd207066ea8"}, "tags": [], "refs": [], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": null, "build_path": null, "deferred": false, "unrendered_config": {"quote_columns": "{{ true if target.type == 'redshift' else false }}", "column_types": {"modification_time": "timestamp", "start_time": "timestamp", "end_time": "timestamp", "creation_time": "timestamp", "_fivetran_synced": "timestamp"}}, "created_at": 1661548508.7766368, "compiled_sql": "", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "\"postgres\".\"apple_search_ads_integration_tests\".\"ad_history_data\""}, "seed.apple_search_ads_integration_tests.ad_group_history_data": {"raw_sql": "", "compiled": true, "resource_type": "seed", "depends_on": {"macros": [], "nodes": []}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "materialized": "seed", "persist_docs": {}, "quoting": {}, "column_types": {"modification_time": "timestamp", "start_time": "timestamp", "end_time": "timestamp", "creation_time": "timestamp", "_fivetran_synced": "timestamp"}, "full_refresh": null, "on_schema_change": "ignore", "quote_columns": false, "post-hook": [], "pre-hook": []}, "database": "postgres", "schema": "apple_search_ads_integration_tests", "fqn": ["apple_search_ads_integration_tests", "ad_group_history_data"], "unique_id": "seed.apple_search_ads_integration_tests.ad_group_history_data", "package_name": "apple_search_ads_integration_tests", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests", "path": "ad_group_history_data.csv", "original_file_path": "seeds/ad_group_history_data.csv", "name": "ad_group_history_data", "alias": "ad_group_history_data", "checksum": {"name": "sha256", "checksum": "a9cfeb9cc85210420753798963e582f647bc3fe966ef725b7d3cd061f65325c4"}, "tags": [], "refs": [], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": null, "build_path": null, "deferred": false, "unrendered_config": {"quote_columns": "{{ true if target.type == 'redshift' else false }}", "column_types": {"modification_time": "timestamp", "start_time": "timestamp", "end_time": "timestamp", "creation_time": "timestamp", "_fivetran_synced": "timestamp"}}, "created_at": 1661548508.777596, "compiled_sql": "", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "\"postgres\".\"apple_search_ads_integration_tests\".\"ad_group_history_data\""}, "seed.apple_search_ads_integration_tests.campaign_history_data": {"raw_sql": "", "compiled": true, "resource_type": "seed", "depends_on": {"macros": [], "nodes": []}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "materialized": "seed", "persist_docs": {}, "quoting": {}, "column_types": {"modification_time": "timestamp", "start_time": "timestamp", "end_time": "timestamp", "creation_time": "timestamp", "_fivetran_synced": "timestamp"}, "full_refresh": null, "on_schema_change": "ignore", "quote_columns": false, "post-hook": [], "pre-hook": []}, "database": "postgres", "schema": "apple_search_ads_integration_tests", "fqn": ["apple_search_ads_integration_tests", "campaign_history_data"], "unique_id": "seed.apple_search_ads_integration_tests.campaign_history_data", "package_name": "apple_search_ads_integration_tests", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests", "path": "campaign_history_data.csv", "original_file_path": "seeds/campaign_history_data.csv", "name": "campaign_history_data", "alias": "campaign_history_data", "checksum": {"name": "sha256", "checksum": "56fa1720930e88d590eb11b16d93d5c7e28e5f9bec57866047040a1a183ad3f3"}, "tags": [], "refs": [], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": null, "build_path": null, "deferred": false, "unrendered_config": {"quote_columns": "{{ true if target.type == 'redshift' else false }}", "column_types": {"modification_time": "timestamp", "start_time": "timestamp", "end_time": "timestamp", "creation_time": "timestamp", "_fivetran_synced": "timestamp"}}, "created_at": 1661548508.778574, "compiled_sql": "", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "\"postgres\".\"apple_search_ads_integration_tests\".\"campaign_history_data\""}, "seed.apple_search_ads_integration_tests.campaign_report_data": {"raw_sql": "", "compiled": true, "resource_type": "seed", "depends_on": {"macros": [], "nodes": []}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "materialized": "seed", "persist_docs": {}, "quoting": {}, "column_types": {"modification_time": "timestamp", "start_time": "timestamp", "end_time": "timestamp", "creation_time": "timestamp", "_fivetran_synced": "timestamp"}, "full_refresh": null, "on_schema_change": "ignore", "quote_columns": false, "post-hook": [], "pre-hook": []}, "database": "postgres", "schema": "apple_search_ads_integration_tests", "fqn": ["apple_search_ads_integration_tests", "campaign_report_data"], "unique_id": "seed.apple_search_ads_integration_tests.campaign_report_data", "package_name": "apple_search_ads_integration_tests", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests", "path": "campaign_report_data.csv", "original_file_path": "seeds/campaign_report_data.csv", "name": "campaign_report_data", "alias": "campaign_report_data", "checksum": {"name": "sha256", "checksum": "a4a374475156eb8d9ddc40c43cadbcc843efcf7a55180346d2d4b875c2791ab1"}, "tags": [], "refs": [], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": null, "build_path": null, "deferred": false, "unrendered_config": {"quote_columns": "{{ true if target.type == 'redshift' else false }}", "column_types": {"modification_time": "timestamp", "start_time": "timestamp", "end_time": "timestamp", "creation_time": "timestamp", "_fivetran_synced": "timestamp"}}, "created_at": 1661548508.779532, "compiled_sql": "", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "\"postgres\".\"apple_search_ads_integration_tests\".\"campaign_report_data\""}, "seed.apple_search_ads_integration_tests.keyword_history_data": {"raw_sql": "", "compiled": true, "resource_type": "seed", "depends_on": {"macros": [], "nodes": []}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "materialized": "seed", "persist_docs": {}, "quoting": {}, "column_types": {"modification_time": "timestamp", "start_time": "timestamp", "end_time": "timestamp", "creation_time": "timestamp", "_fivetran_synced": "timestamp"}, "full_refresh": null, "on_schema_change": "ignore", "quote_columns": false, "post-hook": [], "pre-hook": []}, "database": "postgres", "schema": "apple_search_ads_integration_tests", "fqn": ["apple_search_ads_integration_tests", "keyword_history_data"], "unique_id": "seed.apple_search_ads_integration_tests.keyword_history_data", "package_name": "apple_search_ads_integration_tests", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests", "path": "keyword_history_data.csv", "original_file_path": "seeds/keyword_history_data.csv", "name": "keyword_history_data", "alias": "keyword_history_data", "checksum": {"name": "sha256", "checksum": "9ad23801ae95fc44211fac6c893f67825e34df0e6ba4e967eeb4fe5c3391b86b"}, "tags": [], "refs": [], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": null, "build_path": null, "deferred": false, "unrendered_config": {"quote_columns": "{{ true if target.type == 'redshift' else false }}", "column_types": {"modification_time": "timestamp", "start_time": "timestamp", "end_time": "timestamp", "creation_time": "timestamp", "_fivetran_synced": "timestamp"}}, "created_at": 1661548508.780589, "compiled_sql": "", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "\"postgres\".\"apple_search_ads_integration_tests\".\"keyword_history_data\""}, "seed.apple_search_ads_integration_tests.search_term_report_data": {"raw_sql": "", "compiled": true, "resource_type": "seed", "depends_on": {"macros": [], "nodes": []}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "materialized": "seed", "persist_docs": {}, "quoting": {}, "column_types": {"modification_time": "timestamp", "start_time": "timestamp", "end_time": "timestamp", "creation_time": "timestamp", "_fivetran_synced": "timestamp"}, "full_refresh": null, "on_schema_change": "ignore", "quote_columns": false, "post-hook": [], "pre-hook": []}, "database": "postgres", "schema": "apple_search_ads_integration_tests", "fqn": ["apple_search_ads_integration_tests", "search_term_report_data"], "unique_id": "seed.apple_search_ads_integration_tests.search_term_report_data", "package_name": "apple_search_ads_integration_tests", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests", "path": "search_term_report_data.csv", "original_file_path": "seeds/search_term_report_data.csv", "name": "search_term_report_data", "alias": "search_term_report_data", "checksum": {"name": "sha256", "checksum": "6add75b68a0f9a6f153a9fb83a682387a76a5b89d6dcd14fdbbcb5b418bb3b5a"}, "tags": [], "refs": [], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": null, "build_path": null, "deferred": false, "unrendered_config": {"quote_columns": "{{ true if target.type == 'redshift' else false }}", "column_types": {"modification_time": "timestamp", "start_time": "timestamp", "end_time": "timestamp", "creation_time": "timestamp", "_fivetran_synced": "timestamp"}}, "created_at": 1661548508.781583, "compiled_sql": "", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "\"postgres\".\"apple_search_ads_integration_tests\".\"search_term_report_data\""}, "seed.apple_search_ads_integration_tests.organization_data": {"raw_sql": "", "compiled": true, "resource_type": "seed", "depends_on": {"macros": [], "nodes": []}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "materialized": "seed", "persist_docs": {}, "quoting": {}, "column_types": {"modification_time": "timestamp", "start_time": "timestamp", "end_time": "timestamp", "creation_time": "timestamp", "_fivetran_synced": "timestamp"}, "full_refresh": null, "on_schema_change": "ignore", "quote_columns": false, "post-hook": [], "pre-hook": []}, "database": "postgres", "schema": "apple_search_ads_integration_tests", "fqn": ["apple_search_ads_integration_tests", "organization_data"], "unique_id": "seed.apple_search_ads_integration_tests.organization_data", "package_name": "apple_search_ads_integration_tests", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests", "path": "organization_data.csv", "original_file_path": "seeds/organization_data.csv", "name": "organization_data", "alias": "organization_data", "checksum": {"name": "sha256", "checksum": "bbb5878ab9c07bd1f391181a8321ea50476f37d25f36fd1d66e58d513336699c"}, "tags": [], "refs": [], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": null, "build_path": null, "deferred": false, "unrendered_config": {"quote_columns": "{{ true if target.type == 'redshift' else false }}", "column_types": {"modification_time": "timestamp", "start_time": "timestamp", "end_time": "timestamp", "creation_time": "timestamp", "_fivetran_synced": "timestamp"}}, "created_at": 1661548508.7826319, "compiled_sql": "", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "\"postgres\".\"apple_search_ads_integration_tests\".\"organization_data\""}, "model.apple_search_ads.apple_search_ads__ad_report": {"raw_sql": "{{ config(enabled=var('ad_reporting__apple_search_ads_enabled', True)) }}\n\nwith report as (\n\n select *\n from {{ var('ad_report') }}\n), \n\nad as (\n\n select * \n from {{ var('ad_history') }}\n where is_most_recent_record = True\n), \n\nad_group as (\n\n select * \n from {{ var('ad_group_history') }}\n where is_most_recent_record = True\n), \n\ncampaign as (\n\n select *\n from {{ var('campaign_history') }}\n where is_most_recent_record = True\n), \n\norganization as (\n\n select * \n from {{ var('organization') }}\n), \n\njoined as (\n\n select \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 ad.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,\n sum(report.redownloads) as redownloads,\n sum(report.new_downloads + report.redownloads) as total_downloads,\n sum(report.impressions) as impressions,\n sum(report.spend) as spend\n\n {{ fivetran_utils.persist_pass_through_columns(pass_through_variable='apple_search_ads__ad_passthrough_metrics', transform = 'sum') }}\n from report\n join ad \n on report.ad_id = ad.ad_id\n join ad_group \n on report.ad_group_id = ad_group.ad_group_id\n join campaign \n on report.campaign_id = campaign.campaign_id\n join organization \n on ad.organization_id = organization.organization_id\n {{ dbt_utils.group_by(11) }}\n)\n\nselect * \nfrom joined", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.fivetran_utils.persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__ad_report", "model.apple_search_ads_source.stg_apple_search_ads__ad_history", "model.apple_search_ads_source.stg_apple_search_ads__ad_group_history", "model.apple_search_ads_source.stg_apple_search_ads__campaign_history", "model.apple_search_ads_source.stg_apple_search_ads__organization"]}, "config": {"enabled": true, "alias": null, "schema": "apple_search_ads", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "post-hook": [], "pre-hook": []}, "database": "postgres", "schema": "apple_search_ads_integration_tests_apple_search_ads", "fqn": ["apple_search_ads", "apple_search_ads__ad_report"], "unique_id": "model.apple_search_ads.apple_search_ads__ad_report", "package_name": "apple_search_ads", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads", "path": "apple_search_ads__ad_report.sql", "original_file_path": "models/apple_search_ads__ad_report.sql", "name": "apple_search_ads__ad_report", "alias": "apple_search_ads__ad_report", "checksum": {"name": "sha256", "checksum": "9be99b8581d2c85b4b11327ae3eef34d26121ed866e5762ff7f627b2c24b63a9"}, "tags": [], "refs": [["stg_apple_search_ads__ad_report"], ["stg_apple_search_ads__ad_history"], ["stg_apple_search_ads__ad_group_history"], ["stg_apple_search_ads__campaign_history"], ["stg_apple_search_ads__organization"]], "sources": [], "description": "Each record represents the daily ad performance of each ad.", "columns": {"organization_id": {"name": "organization_id", "description": "Organization ID associated with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "organization_name": {"name": "organization_name", "description": "Organization name associated with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_id": {"name": "campaign_id", "description": "Campaign ID associated with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_name": {"name": "campaign_name", "description": "Campaign name associated with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "ad_group_id": {"name": "ad_group_id", "description": "Ad group ID associated with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "ad_group_name": {"name": "ad_group_name", "description": "Ad group name associated with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "ad_id": {"name": "ad_id", "description": "Ad ID associated with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "ad_name": {"name": "ad_name", "description": "Ad name associated with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "ad_status": {"name": "ad_status", "description": "The status of the ad associated with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "date_day": {"name": "date_day", "description": "Date of the report.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "currency": {"name": "currency", "description": "This currency value should match the respective organization's currency value.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "taps": {"name": "taps", "description": "Number of taps on ad group on given day.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "new_downloads": {"name": "new_downloads", "description": "App downloads from new users who have never before installed app of ad group in a given day.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "redownloads": {"name": "redownloads", "description": "Number of user downloads where user deletes app 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 of ad group in a given day.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_downloads": {"name": "total_downloads", "description": "The sum of new_downloads and redownloads.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "impressions": {"name": "impressions", "description": "The number of impressions of ad group in a given day.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "spend": {"name": "spend", "description": "The spend on ad group in the given day.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "apple_search_ads://models/apple_search_ads.yml", "compiled_path": "target/compiled/apple_search_ads/models/apple_search_ads__ad_report.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "apple_search_ads", "materialized": "table", "enabled": true}, "created_at": 1661548509.0315368, "compiled_sql": "\n\nwith report as (\n\n select *\n from \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__ad_report\"\n), \n\nad as (\n\n select * \n from \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__ad_history\"\n where is_most_recent_record = True\n), \n\nad_group as (\n\n select * \n from \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__ad_group_history\"\n where is_most_recent_record = True\n), \n\ncampaign as (\n\n select *\n from \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__campaign_history\"\n where is_most_recent_record = True\n), \n\norganization as (\n\n select * \n from \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__organization\"\n), \n\njoined as (\n\n select \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 ad.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,\n sum(report.redownloads) as redownloads,\n sum(report.new_downloads + report.redownloads) as total_downloads,\n sum(report.impressions) as impressions,\n sum(report.spend) as spend\n\n \n\n\n\n\n from report\n join ad \n on report.ad_id = ad.ad_id\n join ad_group \n on report.ad_group_id = ad_group.ad_group_id\n join campaign \n on report.campaign_id = campaign.campaign_id\n join organization \n on ad.organization_id = organization.organization_id\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": [], "relation_name": "\"postgres\".\"apple_search_ads_integration_tests_apple_search_ads\".\"apple_search_ads__ad_report\""}, "model.apple_search_ads.apple_search_ads__ad_group_report": {"raw_sql": "{{ config(enabled=var('ad_reporting__apple_search_ads_enabled', True)) }}\n\nwith report as (\n\n select *\n from {{ var('ad_group_report') }}\n), \n\nad_group as (\n\n select * \n from {{ var('ad_group_history') }}\n where is_most_recent_record = True\n), \n\ncampaign as (\n\n select *\n from {{ var('campaign_history') }}\n where is_most_recent_record = True\n), \n\norganization as (\n\n select * \n from {{ var('organization') }}\n), \n\njoined as (\n\n select \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.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,\n sum(report.redownloads) as redownloads,\n sum(report.new_downloads + report.redownloads) as total_downloads,\n sum(report.impressions) as impressions,\n sum(report.spend) as spend\n\n {{ fivetran_utils.persist_pass_through_columns(pass_through_variable='apple_search_ads__ad_group_passthrough_metrics', transform = 'sum') }}\n from report\n join ad_group \n on report.ad_group_id = ad_group.ad_group_id\n join campaign \n on ad_group.campaign_id = campaign.campaign_id\n join organization \n on ad_group.organization_id = organization.organization_id\n {{ dbt_utils.group_by(11) }}\n)\n\nselect * \nfrom joined", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.fivetran_utils.persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__ad_group_report", "model.apple_search_ads_source.stg_apple_search_ads__ad_group_history", "model.apple_search_ads_source.stg_apple_search_ads__campaign_history", "model.apple_search_ads_source.stg_apple_search_ads__organization"]}, "config": {"enabled": true, "alias": null, "schema": "apple_search_ads", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "post-hook": [], "pre-hook": []}, "database": "postgres", "schema": "apple_search_ads_integration_tests_apple_search_ads", "fqn": ["apple_search_ads", "apple_search_ads__ad_group_report"], "unique_id": "model.apple_search_ads.apple_search_ads__ad_group_report", "package_name": "apple_search_ads", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads", "path": "apple_search_ads__ad_group_report.sql", "original_file_path": "models/apple_search_ads__ad_group_report.sql", "name": "apple_search_ads__ad_group_report", "alias": "apple_search_ads__ad_group_report", "checksum": {"name": "sha256", "checksum": "a1edd5d4e81de3dadca268c67fc1bee311cab1edc7efe48a494c7017c7acdc80"}, "tags": [], "refs": [["stg_apple_search_ads__ad_group_report"], ["stg_apple_search_ads__ad_group_history"], ["stg_apple_search_ads__campaign_history"], ["stg_apple_search_ads__organization"]], "sources": [], "description": "Each record represents the daily ad performance of each ad group.", "columns": {"organization_id": {"name": "organization_id", "description": "Organization ID associated with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "organization_name": {"name": "organization_name", "description": "Organization name associated with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_id": {"name": "campaign_id", "description": "Campaign ID associated with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_name": {"name": "campaign_name", "description": "Campaign name associated with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "ad_group_id": {"name": "ad_group_id", "description": "Ad group ID associated with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "ad_group_name": {"name": "ad_group_name", "description": "Ad group name associated with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "ad_group_status": {"name": "ad_group_status", "description": "The status of the ad group associated with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "start_at": {"name": "start_at", "description": "The start timestamp for this ad group.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "end_at": {"name": "end_at", "description": "The end timestamp for this ad group.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "date_day": {"name": "date_day", "description": "Date of the report.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "currency": {"name": "currency", "description": "This currency value should match the respective organization's currency value.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "taps": {"name": "taps", "description": "Number of taps on ad group on given day.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "new_downloads": {"name": "new_downloads", "description": "App downloads from new users who have never before installed app of ad group in a given day.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "redownloads": {"name": "redownloads", "description": "Number of user downloads where user deletes app 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 of ad group in a given day.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_downloads": {"name": "total_downloads", "description": "The sum of new_downloads and redownloads.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "impressions": {"name": "impressions", "description": "The number of impressions of ad group in a given day.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "spend": {"name": "spend", "description": "The spend on ad group in the given day.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "apple_search_ads://models/apple_search_ads.yml", "compiled_path": "target/compiled/apple_search_ads/models/apple_search_ads__ad_group_report.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "apple_search_ads", "materialized": "table", "enabled": true}, "created_at": 1661548509.028775, "compiled_sql": "\n\nwith report as (\n\n select *\n from \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__ad_group_report\"\n), \n\nad_group as (\n\n select * \n from \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__ad_group_history\"\n where is_most_recent_record = True\n), \n\ncampaign as (\n\n select *\n from \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__campaign_history\"\n where is_most_recent_record = True\n), \n\norganization as (\n\n select * \n from \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__organization\"\n), \n\njoined as (\n\n select \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.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,\n sum(report.redownloads) as redownloads,\n sum(report.new_downloads + report.redownloads) as total_downloads,\n sum(report.impressions) as impressions,\n sum(report.spend) as spend\n\n \n\n\n\n\n from report\n join ad_group \n on report.ad_group_id = ad_group.ad_group_id\n join campaign \n on ad_group.campaign_id = campaign.campaign_id\n join organization \n on ad_group.organization_id = organization.organization_id\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": [], "relation_name": "\"postgres\".\"apple_search_ads_integration_tests_apple_search_ads\".\"apple_search_ads__ad_group_report\""}, "model.apple_search_ads.apple_search_ads__keyword_report": {"raw_sql": "{{ config(enabled=var('ad_reporting__apple_search_ads_enabled', True)) }}\n\nwith report as (\n\n select *\n from {{ var('keyword_report') }}\n), \n\nkeyword as (\n\n select *\n from {{ var('keyword_history') }}\n where is_most_recent_record = True\n), \n\nad_group as (\n\n select *\n from {{ var('ad_group_history') }}\n where is_most_recent_record = True\n), \n\ncampaign as (\n\n select *\n from {{ var('campaign_history') }}\n where is_most_recent_record = True\n), \n\norganization as (\n\n select * \n from {{ var('organization') }}\n), \n\njoined as (\n\n select \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 keyword.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,\n sum(report.redownloads) as redownloads,\n sum(report.new_downloads + report.redownloads) as total_downloads,\n sum(report.impressions) as impressions,\n sum(report.spend) as spend\n\n {{ fivetran_utils.persist_pass_through_columns(pass_through_variable='apple_search_ads__keyword_passthrough_metrics', transform = 'sum') }}\n from report\n join keyword \n on report.keyword_id = keyword.keyword_id\n join ad_group \n on keyword.ad_group_id = ad_group.ad_group_id\n join campaign \n on ad_group.campaign_id = campaign.campaign_id\n join organization \n on ad_group.organization_id = organization.organization_id\n {{ dbt_utils.group_by(12) }}\n)\n\nselect * \nfrom joined", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.fivetran_utils.persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__keyword_report", "model.apple_search_ads_source.stg_apple_search_ads__keyword_history", "model.apple_search_ads_source.stg_apple_search_ads__ad_group_history", "model.apple_search_ads_source.stg_apple_search_ads__campaign_history", "model.apple_search_ads_source.stg_apple_search_ads__organization"]}, "config": {"enabled": true, "alias": null, "schema": "apple_search_ads", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "post-hook": [], "pre-hook": []}, "database": "postgres", "schema": "apple_search_ads_integration_tests_apple_search_ads", "fqn": ["apple_search_ads", "apple_search_ads__keyword_report"], "unique_id": "model.apple_search_ads.apple_search_ads__keyword_report", "package_name": "apple_search_ads", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads", "path": "apple_search_ads__keyword_report.sql", "original_file_path": "models/apple_search_ads__keyword_report.sql", "name": "apple_search_ads__keyword_report", "alias": "apple_search_ads__keyword_report", "checksum": {"name": "sha256", "checksum": "91250ca8167dc8fee98582ff093d56a498b854e5c66a51325076191016bfb0e7"}, "tags": [], "refs": [["stg_apple_search_ads__keyword_report"], ["stg_apple_search_ads__keyword_history"], ["stg_apple_search_ads__ad_group_history"], ["stg_apple_search_ads__campaign_history"], ["stg_apple_search_ads__organization"]], "sources": [], "description": "Each record represents the daily ad performance of each creative set.", "columns": {"organization_id": {"name": "organization_id", "description": "Organization ID associated with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "organization_name": {"name": "organization_name", "description": "Organization name associated with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_id": {"name": "campaign_id", "description": "Campaign ID associated with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_name": {"name": "campaign_name", "description": "Campaign name associated with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "ad_group_id": {"name": "ad_group_id", "description": "Ad group ID associated with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "ad_group_name": {"name": "ad_group_name", "description": "Ad group name associated with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "keyword_id": {"name": "keyword_id", "description": "Creative set name associatd with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "keyword_text": {"name": "keyword_text", "description": "Creative set ID associated with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "match_type": {"name": "match_type", "description": "Controls how ads are matched to user searches; EXACT or BROAD.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "date_day": {"name": "date_day", "description": "Date of the report.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "currency": {"name": "currency", "description": "This currency value should match the respective organization's currency value.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "keyword_status": {"name": "keyword_status", "description": "The status of the keyword associated with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "taps": {"name": "taps", "description": "Number of taps on keyword on given day.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "new_downloads": {"name": "new_downloads", "description": "App downloads from new users who have never before installed app of keyword in a given day.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "redownloads": {"name": "redownloads", "description": "Number of user downloads where user deletes app 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 of keyword in a given day.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_downloads": {"name": "total_downloads", "description": "The sum of new_downloads and redownloads.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "impressions": {"name": "impressions", "description": "The number of impressions of keyword in a given day.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "spend": {"name": "spend", "description": "The spend on keyword in the given day.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "apple_search_ads://models/apple_search_ads.yml", "compiled_path": "target/compiled/apple_search_ads/models/apple_search_ads__keyword_report.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "apple_search_ads", "materialized": "table", "enabled": true}, "created_at": 1661548509.0367491, "compiled_sql": "\n\nwith report as (\n\n select *\n from \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__keyword_report\"\n), \n\nkeyword as (\n\n select *\n from \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__keyword_history\"\n where is_most_recent_record = True\n), \n\nad_group as (\n\n select *\n from \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__ad_group_history\"\n where is_most_recent_record = True\n), \n\ncampaign as (\n\n select *\n from \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__campaign_history\"\n where is_most_recent_record = True\n), \n\norganization as (\n\n select * \n from \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__organization\"\n), \n\njoined as (\n\n select \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 keyword.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,\n sum(report.redownloads) as redownloads,\n sum(report.new_downloads + report.redownloads) as total_downloads,\n sum(report.impressions) as impressions,\n sum(report.spend) as spend\n\n \n\n\n\n\n from report\n join keyword \n on report.keyword_id = keyword.keyword_id\n join ad_group \n on keyword.ad_group_id = ad_group.ad_group_id\n join campaign \n on ad_group.campaign_id = campaign.campaign_id\n join organization \n on ad_group.organization_id = organization.organization_id\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": [], "relation_name": "\"postgres\".\"apple_search_ads_integration_tests_apple_search_ads\".\"apple_search_ads__keyword_report\""}, "model.apple_search_ads.apple_search_ads__search_term_report": {"raw_sql": "{{ 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 {{ var('search_term_report') }}\n), \n\ncampaign as (\n\n select *\n from {{ var('campaign_history') }}\n where is_most_recent_record = True\n), \n\norganization as (\n\n select * \n from {{ var('organization') }}\n), \n\njoined as (\n\n select \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 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,\n sum(report.redownloads) as redownloads,\n sum(report.new_downloads + report.redownloads) as total_downloads,\n sum(report.impressions) as impressions,\n sum(report.spend) as spend\n\n {{ fivetran_utils.persist_pass_through_columns(pass_through_variable='apple_search_ads__search_term_passthrough_metrics', transform = 'sum') }}\n from report\n join campaign \n on report.campaign_id = campaign.campaign_id\n join organization \n on campaign.organization_id = organization.organization_id\n where report.search_term_text is not null\n {{ dbt_utils.group_by(12) }}\n)\n\nselect * \nfrom joined", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.fivetran_utils.persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__search_term_report", "model.apple_search_ads_source.stg_apple_search_ads__campaign_history", "model.apple_search_ads_source.stg_apple_search_ads__organization"]}, "config": {"enabled": true, "alias": null, "schema": "apple_search_ads", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "post-hook": [], "pre-hook": []}, "database": "postgres", "schema": "apple_search_ads_integration_tests_apple_search_ads", "fqn": ["apple_search_ads", "apple_search_ads__search_term_report"], "unique_id": "model.apple_search_ads.apple_search_ads__search_term_report", "package_name": "apple_search_ads", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads", "path": "apple_search_ads__search_term_report.sql", "original_file_path": "models/apple_search_ads__search_term_report.sql", "name": "apple_search_ads__search_term_report", "alias": "apple_search_ads__search_term_report", "checksum": {"name": "sha256", "checksum": "4827d710dac6b2e632dcf3ba421a8166d719d1ae59e98128736b8689cf4039a1"}, "tags": [], "refs": [["stg_apple_search_ads__search_term_report"], ["stg_apple_search_ads__campaign_history"], ["stg_apple_search_ads__organization"]], "sources": [], "description": "Each record represents the daily ad performance of each search term, only includes records with search term values.", "columns": {"organization_id": {"name": "organization_id", "description": "Organization ID associated with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "organization_name": {"name": "organization_name", "description": "Organization name associated with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_id": {"name": "campaign_id", "description": "Campaign ID associated with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_name": {"name": "campaign_name", "description": "Campaign name associated with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "ad_group_id": {"name": "ad_group_id", "description": "Ad group ID associated with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "ad_group_name": {"name": "ad_group_name", "description": "Ad group name associated with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "match_type": {"name": "match_type", "description": "Controls how ads are matched to user searches; EXACT or BROAD.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "date_day": {"name": "date_day", "description": "Date of the report.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "search_term_text": {"name": "search_term_text", "description": "Search term text.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "currency": {"name": "currency", "description": "This currency value should match the respective organization's currency value.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "taps": {"name": "taps", "description": "Number of taps on organization on given day.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "new_downloads": {"name": "new_downloads", "description": "App downloads from new users who have never before installed app of organization in a given day.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "redownloads": {"name": "redownloads", "description": "Number of user downloads where user deletes app 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 of organization in a given day.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_downloads": {"name": "total_downloads", "description": "The sum of new_downloads and redownloads.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "impressions": {"name": "impressions", "description": "The number of impressions of organization in a given day.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "spend": {"name": "spend", "description": "The spend on organization in the given day.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "apple_search_ads://models/apple_search_ads.yml", "compiled_path": "target/compiled/apple_search_ads/models/apple_search_ads__search_term_report.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "apple_search_ads", "materialized": "table", "enabled": true}, "created_at": 1661548509.041554, "compiled_sql": "\n\nwith report as (\n\n select *\n from \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__search_term_report\"\n), \n\ncampaign as (\n\n select *\n from \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__campaign_history\"\n where is_most_recent_record = True\n), \n\norganization as (\n\n select * \n from \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__organization\"\n), \n\njoined as (\n\n select \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 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,\n sum(report.redownloads) as redownloads,\n sum(report.new_downloads + report.redownloads) as total_downloads,\n sum(report.impressions) as impressions,\n sum(report.spend) as spend\n\n \n\n\n\n\n from report\n join campaign \n on report.campaign_id = campaign.campaign_id\n join organization \n on campaign.organization_id = organization.organization_id\n where report.search_term_text is not null\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": [], "relation_name": "\"postgres\".\"apple_search_ads_integration_tests_apple_search_ads\".\"apple_search_ads__search_term_report\""}, "model.apple_search_ads.apple_search_ads__campaign_report": {"raw_sql": "{{ config(enabled=var('ad_reporting__apple_search_ads_enabled', True)) }}\n\nwith report as (\n \n select *\n from {{ var('campaign_report') }}\n\n), \n\ncampaign as (\n\n select *\n from {{ var('campaign_history') }}\n where is_most_recent_record = True\n), \n\norganization as (\n\n select * \n from {{ var('organization') }}\n\n), \n\njoined as (\n\n select \n report.date_day,\n campaign.organization_id,\n organization.organization_name,\n campaign.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,\n sum(report.redownloads) as redownloads,\n sum(report.new_downloads + report.redownloads) as total_downloads,\n sum(report.impressions) as impressions,\n sum(report.spend) as spend\n\n {{ fivetran_utils.persist_pass_through_columns(pass_through_variable='apple_search_ads__campaign_passthrough_metrics', transform = 'sum') }}\n from report\n join campaign \n on report.campaign_id = campaign.campaign_id\n join organization \n on campaign.organization_id = organization.organization_id\n {{ dbt_utils.group_by(9) }}\n)\n\nselect * \nfrom joined", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.fivetran_utils.persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__campaign_report", "model.apple_search_ads_source.stg_apple_search_ads__campaign_history", "model.apple_search_ads_source.stg_apple_search_ads__organization"]}, "config": {"enabled": true, "alias": null, "schema": "apple_search_ads", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "post-hook": [], "pre-hook": []}, "database": "postgres", "schema": "apple_search_ads_integration_tests_apple_search_ads", "fqn": ["apple_search_ads", "apple_search_ads__campaign_report"], "unique_id": "model.apple_search_ads.apple_search_ads__campaign_report", "package_name": "apple_search_ads", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads", "path": "apple_search_ads__campaign_report.sql", "original_file_path": "models/apple_search_ads__campaign_report.sql", "name": "apple_search_ads__campaign_report", "alias": "apple_search_ads__campaign_report", "checksum": {"name": "sha256", "checksum": "d555ffbfe1f914afd50ba592ab961f1ebdb40a4d4315c0696f1c80738930080f"}, "tags": [], "refs": [["stg_apple_search_ads__campaign_report"], ["stg_apple_search_ads__campaign_history"], ["stg_apple_search_ads__organization"]], "sources": [], "description": "Each record represents the daily ad performance of each campaign.", "columns": {"organization_id": {"name": "organization_id", "description": "Organization ID associated with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "organization_name": {"name": "organization_name", "description": "Organization name associated with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_id": {"name": "campaign_id", "description": "Campaign ID associated with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_name": {"name": "campaign_name", "description": "Campaign name associated with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_status": {"name": "campaign_status", "description": "The status of the campaign associted with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "start_at": {"name": "start_at", "description": "The start timestamp of this campaign.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "end_at": {"name": "end_at", "description": "The end timestamp of this campaign.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "date_day": {"name": "date_day", "description": "Date of the report.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "currency": {"name": "currency", "description": "This currency value should match the respective organization's currency value.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "taps": {"name": "taps", "description": "Number of taps on campaign on given day.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "new_downloads": {"name": "new_downloads", "description": "App downloads from new users who have never before installed app of campaign in a given day.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "redownloads": {"name": "redownloads", "description": "Number of user downloads where user deletes app 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 of campaign in a given day.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_downloads": {"name": "total_downloads", "description": "The sum of new_downloads and redownloads.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "impressions": {"name": "impressions", "description": "The number of impressions of campaign in a given day.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "spend": {"name": "spend", "description": "The spend on campaign in the given day.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "apple_search_ads://models/apple_search_ads.yml", "compiled_path": "target/compiled/apple_search_ads/models/apple_search_ads__campaign_report.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "apple_search_ads", "materialized": "table", "enabled": true}, "created_at": 1661548509.033949, "compiled_sql": "\n\nwith report as (\n \n select *\n from \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__campaign_report\"\n\n), \n\ncampaign as (\n\n select *\n from \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__campaign_history\"\n where is_most_recent_record = True\n), \n\norganization as (\n\n select * \n from \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__organization\"\n\n), \n\njoined as (\n\n select \n report.date_day,\n campaign.organization_id,\n organization.organization_name,\n campaign.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,\n sum(report.redownloads) as redownloads,\n sum(report.new_downloads + report.redownloads) as total_downloads,\n sum(report.impressions) as impressions,\n sum(report.spend) as spend\n\n \n\n\n\n\n from report\n join campaign \n on report.campaign_id = campaign.campaign_id\n join organization \n on campaign.organization_id = organization.organization_id\n group by 1,2,3,4,5,6,7,8,9\n)\n\nselect * \nfrom joined", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "\"postgres\".\"apple_search_ads_integration_tests_apple_search_ads\".\"apple_search_ads__campaign_report\""}, "model.apple_search_ads.apple_search_ads__organization_report": {"raw_sql": "{{ config(enabled=var('ad_reporting__apple_search_ads_enabled', True)) }}\n\nwith report as (\n \n select *\n from {{ var('campaign_report') }}\n), \n\ncampaign as (\n\n select *\n from {{ var('campaign_history') }}\n where is_most_recent_record = True\n), \n\norganization as (\n\n select * \n from {{ var('organization') }}\n), \n\njoined as (\n\n select \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,\n sum(report.redownloads) as redownloads,\n sum(report.new_downloads + report.redownloads) as total_downloads,\n sum(report.impressions) as impressions,\n sum(report.spend) as spend\n\n {{ fivetran_utils.persist_pass_through_columns(pass_through_variable='apple_search_ads__campaign_passthrough_metrics', transform = 'sum') }}\n from report\n join campaign \n on report.campaign_id = campaign.campaign_id\n join organization \n on campaign.organization_id = organization.organization_id\n {{ dbt_utils.group_by(4) }}\n)\n\nselect * \nfrom joined", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.fivetran_utils.persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__campaign_report", "model.apple_search_ads_source.stg_apple_search_ads__campaign_history", "model.apple_search_ads_source.stg_apple_search_ads__organization"]}, "config": {"enabled": true, "alias": null, "schema": "apple_search_ads", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "post-hook": [], "pre-hook": []}, "database": "postgres", "schema": "apple_search_ads_integration_tests_apple_search_ads", "fqn": ["apple_search_ads", "apple_search_ads__organization_report"], "unique_id": "model.apple_search_ads.apple_search_ads__organization_report", "package_name": "apple_search_ads", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads", "path": "apple_search_ads__organization_report.sql", "original_file_path": "models/apple_search_ads__organization_report.sql", "name": "apple_search_ads__organization_report", "alias": "apple_search_ads__organization_report", "checksum": {"name": "sha256", "checksum": "47084fe8809edaeeda722e20590b19c6488687d05ad654b8fef4a0021088e0a2"}, "tags": [], "refs": [["stg_apple_search_ads__campaign_report"], ["stg_apple_search_ads__campaign_history"], ["stg_apple_search_ads__organization"]], "sources": [], "description": "Each record represents the daily ad performance of each organization.", "columns": {"organization_id": {"name": "organization_id", "description": "Organization ID associated with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "organization_name": {"name": "organization_name", "description": "Organization name associated with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "date_day": {"name": "date_day", "description": "Date of the report.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "currency": {"name": "currency", "description": "This currency value should match the respective organization's currency value.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "taps": {"name": "taps", "description": "Number of taps on organization on given day.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "new_downloads": {"name": "new_downloads", "description": "App downloads from new users who have never before installed app of organization in a given day.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "redownloads": {"name": "redownloads", "description": "Number of user downloads where user deletes app 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 of organization in a given day.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_downloads": {"name": "total_downloads", "description": "The sum of new_downloads and redownloads.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "impressions": {"name": "impressions", "description": "The number of impressions of organization in a given day.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "spend": {"name": "spend", "description": "The spend on organization in the given day.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "apple_search_ads://models/apple_search_ads.yml", "compiled_path": "target/compiled/apple_search_ads/models/apple_search_ads__organization_report.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "apple_search_ads", "materialized": "table", "enabled": true}, "created_at": 1661548509.0390599, "compiled_sql": "\n\nwith report as (\n \n select *\n from \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__campaign_report\"\n), \n\ncampaign as (\n\n select *\n from \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__campaign_history\"\n where is_most_recent_record = True\n), \n\norganization as (\n\n select * \n from \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__organization\"\n), \n\njoined as (\n\n select \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,\n sum(report.redownloads) as redownloads,\n sum(report.new_downloads + report.redownloads) as total_downloads,\n sum(report.impressions) as impressions,\n sum(report.spend) as spend\n\n \n\n\n\n\n from report\n join campaign \n on report.campaign_id = campaign.campaign_id\n join organization \n on campaign.organization_id = organization.organization_id\n group by 1,2,3,4\n)\n\nselect * \nfrom joined", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "\"postgres\".\"apple_search_ads_integration_tests_apple_search_ads\".\"apple_search_ads__organization_report\""}, "model.apple_search_ads_source.stg_apple_search_ads__campaign_history": {"raw_sql": "{{ 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 from base\n),\n\nfinal as (\n \n select\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", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.apple_search_ads_source.get_campaign_history_columns", "macro.fivetran_utils.fill_staging_columns"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__campaign_history_tmp", "model.apple_search_ads_source.stg_apple_search_ads__campaign_history_tmp"]}, "config": {"enabled": true, "alias": null, "schema": "apple_search_ads_source", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "post-hook": [], "pre-hook": []}, "database": "postgres", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "fqn": ["apple_search_ads_source", "stg_apple_search_ads__campaign_history"], "unique_id": "model.apple_search_ads_source.stg_apple_search_ads__campaign_history", "package_name": "apple_search_ads_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "stg_apple_search_ads__campaign_history.sql", "original_file_path": "models/stg_apple_search_ads__campaign_history.sql", "name": "stg_apple_search_ads__campaign_history", "alias": "stg_apple_search_ads__campaign_history", "checksum": {"name": "sha256", "checksum": "294e54bc10f47e44786be1c445e764b49464643d75c0bf7a4fc3a38f3868e0de"}, "tags": [], "refs": [["stg_apple_search_ads__campaign_history_tmp"], ["stg_apple_search_ads__campaign_history_tmp"]], "sources": [], "description": "Each record represents a version of a campaign in Apple Search Ads.", "columns": {"modified_at": {"name": "modified_at", "description": "Timestamp of when the campaign object was last modified.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "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, "quote": null, "tags": []}, "campaign_id": {"name": "campaign_id", "description": "Campaign ID associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "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, "quote": null, "tags": []}, "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, "quote": null, "tags": []}, "campaign_name": {"name": "campaign_name", "description": "Campaign name for the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "organization_id": {"name": "organization_id", "description": "Organization ID associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "status": {"name": "status", "description": "The current status of the campaign, values include ENABLED and PAUSED.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "apple_search_ads_source://models/stg_apple_search_ads.yml", "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads__campaign_history.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "apple_search_ads_source", "materialized": "table", "enabled": true}, "created_at": 1661548509.118322, "compiled_sql": "\n\nwith base as (\n\n select * \n from \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__campaign_history_tmp\"\n),\n\nfields as (\n\n select\n \n cast(null as \n timestamp without time zone\n) as \n \n _fivetran_synced\n \n , \n \n \n adam_id\n \n as \n \n adam_id\n \n, \n \n \n budget_amount\n \n as \n \n budget_amount\n \n, \n \n \n budget_currency\n \n as \n \n budget_currency\n \n, \n \n \n budget_orders\n \n as \n \n budget_orders\n \n, \n \n \n daily_budget_amount\n \n as \n \n daily_budget_amount\n \n, \n \n \n daily_budget_currency\n \n as \n \n daily_budget_currency\n \n, \n \n \n deleted\n \n as \n \n deleted\n \n, \n \n \n end_time\n \n as \n \n end_time\n \n, \n \n \n id\n \n as \n \n id\n \n, \n \n \n loc_invoice_detail_buyer_email\n \n as \n \n loc_invoice_detail_buyer_email\n \n, \n \n \n loc_invoice_detail_buyer_name\n \n as \n \n loc_invoice_detail_buyer_name\n \n, \n \n \n loc_invoice_detail_client_name\n \n as \n \n loc_invoice_detail_client_name\n \n, \n \n \n loc_invoice_detail_order_number\n \n as \n \n loc_invoice_detail_order_number\n \n, \n \n \n modification_time\n \n as \n \n modification_time\n \n, \n \n \n name\n \n as \n \n name\n \n, \n \n \n organization_id\n \n as \n \n organization_id\n \n, \n \n \n payment_model\n \n as \n \n payment_model\n \n, \n \n \n serving_state_reasons\n \n as \n \n serving_state_reasons\n \n, \n \n \n serving_status\n \n as \n \n serving_status\n \n, \n \n \n start_time\n \n as \n \n start_time\n \n, \n \n \n status\n \n as \n \n status\n \n\n\n\n \n from base\n),\n\nfinal as (\n \n select\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": [], "relation_name": "\"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__campaign_history\""}, "model.apple_search_ads_source.stg_apple_search_ads__ad_report": {"raw_sql": "{{ 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 from base\n),\n\nfinal as (\n \n select \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 new_downloads,\n redownloads,\n taps\n\n {{ fivetran_utils.fill_pass_through_columns('apple_search_ads__ad_passthrough_metrics') }}\n from fields\n)\n\nselect *\nfrom final", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.apple_search_ads_source.get_ad_level_report_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.fill_pass_through_columns"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__ad_report_tmp", "model.apple_search_ads_source.stg_apple_search_ads__ad_report_tmp"]}, "config": {"enabled": true, "alias": null, "schema": "apple_search_ads_source", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "post-hook": [], "pre-hook": []}, "database": "postgres", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "fqn": ["apple_search_ads_source", "stg_apple_search_ads__ad_report"], "unique_id": "model.apple_search_ads_source.stg_apple_search_ads__ad_report", "package_name": "apple_search_ads_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "stg_apple_search_ads__ad_report.sql", "original_file_path": "models/stg_apple_search_ads__ad_report.sql", "name": "stg_apple_search_ads__ad_report", "alias": "stg_apple_search_ads__ad_report", "checksum": {"name": "sha256", "checksum": "45019dc2d949eecadbbd9d4a052049a60dca00c32f726da678972fa8bdadd1f6"}, "tags": [], "refs": [["stg_apple_search_ads__ad_report_tmp"], ["stg_apple_search_ads__ad_report_tmp"]], "sources": [], "description": "Each record represents the daily performance of an ad in Apple Search Ads.", "columns": {"date_day": {"name": "date_day", "description": "Date for daily report aggregation.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_id": {"name": "campaign_id", "description": "Campaign ID associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "ad_group_id": {"name": "ad_group_id", "description": "Ad group ID associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "ad_id": {"name": "ad_id", "description": "Ad ID associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "impressions": {"name": "impressions", "description": "Number of times your ad appeared in App Store search results.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "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, "quote": null, "tags": []}, "currency": {"name": "currency", "description": "This currency value should match the respective organization's currency value.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "new_downloads": {"name": "new_downloads", "description": "App downloads from new users who have never before installed the respective app.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "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.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "taps": {"name": "taps", "description": "The number of times ad was tapped by users within the reporting time period.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "apple_search_ads_source://models/stg_apple_search_ads.yml", "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads__ad_report.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "apple_search_ads_source", "materialized": "table", "enabled": true}, "created_at": 1661548509.11685, "compiled_sql": "\n\nwith base as (\n\n select * \n from \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__ad_report_tmp\"\n),\n\nfields as (\n\n select\n \n \n \n ad_group_id\n \n as \n \n ad_group_id\n \n, \n \n \n ad_id\n \n as \n \n ad_id\n \n, \n \n \n campaign_id\n \n as \n \n campaign_id\n \n, \n \n \n date\n \n as \n \n date\n \n, \n \n \n impressions\n \n as \n \n impressions\n \n, \n \n \n local_spend_amount\n \n as \n \n local_spend_amount\n \n, \n \n \n local_spend_currency\n \n as \n \n local_spend_currency\n \n, \n \n \n new_downloads\n \n as \n \n new_downloads\n \n, \n \n \n redownloads\n \n as \n \n redownloads\n \n, \n \n \n taps\n \n as \n \n taps\n \n\n\n\n from base\n),\n\nfinal as (\n \n select \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 new_downloads,\n redownloads,\n taps\n\n \n\n\n\n\n from fields\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "\"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__ad_report\""}, "model.apple_search_ads_source.stg_apple_search_ads__campaign_report": {"raw_sql": "{{ 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 from base\n),\n\nfinal as (\n \n select \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 new_downloads,\n redownloads,\n taps\n\n {{ fivetran_utils.fill_pass_through_columns('apple_search_ads__campaign_passthrough_metrics') }}\n from fields\n)\n\nselect * \nfrom final", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.apple_search_ads_source.get_campaign_report_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.fill_pass_through_columns"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__campaign_report_tmp", "model.apple_search_ads_source.stg_apple_search_ads__campaign_report_tmp"]}, "config": {"enabled": true, "alias": null, "schema": "apple_search_ads_source", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "post-hook": [], "pre-hook": []}, "database": "postgres", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "fqn": ["apple_search_ads_source", "stg_apple_search_ads__campaign_report"], "unique_id": "model.apple_search_ads_source.stg_apple_search_ads__campaign_report", "package_name": "apple_search_ads_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "stg_apple_search_ads__campaign_report.sql", "original_file_path": "models/stg_apple_search_ads__campaign_report.sql", "name": "stg_apple_search_ads__campaign_report", "alias": "stg_apple_search_ads__campaign_report", "checksum": {"name": "sha256", "checksum": "c4681d203c58d68501b9d2d3a84fc28598e9705eb4cc7f4496be52e3209768d3"}, "tags": [], "refs": [["stg_apple_search_ads__campaign_report_tmp"], ["stg_apple_search_ads__campaign_report_tmp"]], "sources": [], "description": "Each record represents the daily performance of a campaign in Apple Search Ads.", "columns": {"campaign_id": {"name": "campaign_id", "description": "Campaign ID associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "date_day": {"name": "date_day", "description": "Date for daily report aggregation.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "impressions": {"name": "impressions", "description": "Number of times your ad appeared in App Store search results.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "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, "quote": null, "tags": []}, "currency": {"name": "currency", "description": "This currency value should match the respective organization's currency value.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "new_downloads": {"name": "new_downloads", "description": "App downloads from new users who have never before installed the respective app.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "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.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "taps": {"name": "taps", "description": "The number of times ad was tapped by users within the reporting time period.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "apple_search_ads_source://models/stg_apple_search_ads.yml", "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads__campaign_report.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "apple_search_ads_source", "materialized": "table", "enabled": true}, "created_at": 1661548509.119655, "compiled_sql": "\n\nwith base as (\n\n select * \n from \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__campaign_report_tmp\"\n),\n\nfields as (\n\n select\n \n \n \n date\n \n as \n \n date\n \n, \n \n \n id\n \n as \n \n id\n \n, \n \n \n impressions\n \n as \n \n impressions\n \n, \n \n \n local_spend_amount\n \n as \n \n local_spend_amount\n \n, \n \n \n local_spend_currency\n \n as \n \n local_spend_currency\n \n, \n \n \n new_downloads\n \n as \n \n new_downloads\n \n, \n \n \n redownloads\n \n as \n \n redownloads\n \n, \n \n \n taps\n \n as \n \n taps\n \n\n\n\n from base\n),\n\nfinal as (\n \n select \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 new_downloads,\n redownloads,\n taps\n\n \n\n\n\n\n from fields\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "\"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__campaign_report\""}, "model.apple_search_ads_source.stg_apple_search_ads__organization": {"raw_sql": "{{ 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 from base\n),\n\nfinal as (\n \n select \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", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.apple_search_ads_source.get_organization_columns", "macro.fivetran_utils.fill_staging_columns"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__organization_tmp", "model.apple_search_ads_source.stg_apple_search_ads__organization_tmp"]}, "config": {"enabled": true, "alias": null, "schema": "apple_search_ads_source", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "post-hook": [], "pre-hook": []}, "database": "postgres", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "fqn": ["apple_search_ads_source", "stg_apple_search_ads__organization"], "unique_id": "model.apple_search_ads_source.stg_apple_search_ads__organization", "package_name": "apple_search_ads_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "stg_apple_search_ads__organization.sql", "original_file_path": "models/stg_apple_search_ads__organization.sql", "name": "stg_apple_search_ads__organization", "alias": "stg_apple_search_ads__organization", "checksum": {"name": "sha256", "checksum": "24d3ee4e2d050e8ade0b3222ea535ed1837d2ea4265f00cf3f3b7b67a7a30dab"}, "tags": [], "refs": [["stg_apple_search_ads__organization_tmp"], ["stg_apple_search_ads__organization_tmp"]], "sources": [], "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, "quote": null, "tags": []}, "currency": {"name": "currency", "description": "Specified currency for respective organization.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "payment_model": {"name": "payment_model", "description": "Values include 'LOC', 'PAYG' or (payment method hasn't been set).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "organization_name": {"name": "organization_name", "description": "Name of organization.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "time_zone": {"name": "time_zone", "description": "Organization default timezone; values can be ORTZ or UTC.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "apple_search_ads_source://models/stg_apple_search_ads.yml", "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads__organization.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "apple_search_ads_source", "materialized": "table", "enabled": true}, "created_at": 1661548509.123604, "compiled_sql": "\n\nwith base as (\n\n select * \n from \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__organization_tmp\"\n),\n\nfields as (\n\n select\n \n cast(null as \n timestamp without time zone\n) as \n \n _fivetran_synced\n \n , \n \n \n currency\n \n as \n \n currency\n \n, \n \n \n id\n \n as \n \n id\n \n, \n \n \n name\n \n as \n \n name\n \n, \n \n \n payment_model\n \n as \n \n payment_model\n \n, \n \n \n role_names\n \n as \n \n role_names\n \n, \n \n \n time_zone\n \n as \n \n time_zone\n \n\n\n\n \n from base\n),\n\nfinal as (\n \n select \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": [], "relation_name": "\"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__organization\""}, "model.apple_search_ads_source.stg_apple_search_ads__keyword_report": {"raw_sql": "{{ 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 from base\n),\n\nfinal as (\n \n select \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 new_downloads,\n redownloads,\n taps\n\n {{ fivetran_utils.fill_pass_through_columns('apple_search_ads__keyword_passthrough_metrics') }}\n from fields\n)\n\nselect * \nfrom final", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.apple_search_ads_source.get_keyword_report_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.fill_pass_through_columns"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__keyword_report_tmp", "model.apple_search_ads_source.stg_apple_search_ads__keyword_report_tmp"]}, "config": {"enabled": true, "alias": null, "schema": "apple_search_ads_source", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "post-hook": [], "pre-hook": []}, "database": "postgres", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "fqn": ["apple_search_ads_source", "stg_apple_search_ads__keyword_report"], "unique_id": "model.apple_search_ads_source.stg_apple_search_ads__keyword_report", "package_name": "apple_search_ads_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "stg_apple_search_ads__keyword_report.sql", "original_file_path": "models/stg_apple_search_ads__keyword_report.sql", "name": "stg_apple_search_ads__keyword_report", "alias": "stg_apple_search_ads__keyword_report", "checksum": {"name": "sha256", "checksum": "087cf73b201edc946f1b30c28096f4d513aca817fc3e510cac05f28dc781c665"}, "tags": [], "refs": [["stg_apple_search_ads__keyword_report_tmp"], ["stg_apple_search_ads__keyword_report_tmp"]], "sources": [], "description": "Each record represents the daily performance of a keyword in Apple Search Ads.", "columns": {"keyword_id": {"name": "keyword_id", "description": "Keyword ID associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "date_day": {"name": "date_day", "description": "Date for daily report aggregation.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "impressions": {"name": "impressions", "description": "Number of times your ad appeared in App Store search results.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "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, "quote": null, "tags": []}, "currency": {"name": "currency", "description": "This currency value should match the respective organization's currency value.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "new_downloads": {"name": "new_downloads", "description": "App downloads from new users who have never before installed the respective app.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "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.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "taps": {"name": "taps", "description": "The number of times ad was tapped by users within the reporting time period.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "apple_search_ads_source://models/stg_apple_search_ads.yml", "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads__keyword_report.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "apple_search_ads_source", "materialized": "table", "enabled": true}, "created_at": 1661548509.122613, "compiled_sql": "\n\nwith base as (\n\n select * \n from \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__keyword_report_tmp\"\n),\n\nfields as (\n\n select\n \n \n \n date\n \n as \n \n date\n \n, \n \n \n id\n \n as \n \n id\n \n, \n \n \n impressions\n \n as \n \n impressions\n \n, \n \n \n local_spend_amount\n \n as \n \n local_spend_amount\n \n, \n \n \n local_spend_currency\n \n as \n \n local_spend_currency\n \n, \n \n \n new_downloads\n \n as \n \n new_downloads\n \n, \n \n \n redownloads\n \n as \n \n redownloads\n \n, \n \n \n taps\n \n as \n \n taps\n \n\n\n \n from base\n),\n\nfinal as (\n \n select \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 new_downloads,\n redownloads,\n taps\n\n \n\n\n\n\n from fields\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "\"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__keyword_report\""}, "model.apple_search_ads_source.stg_apple_search_ads__keyword_history": {"raw_sql": "{{ 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 from base\n),\n\nfinal as (\n \n select \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", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.apple_search_ads_source.get_keyword_history_columns", "macro.fivetran_utils.fill_staging_columns"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__keyword_history_tmp", "model.apple_search_ads_source.stg_apple_search_ads__keyword_history_tmp"]}, "config": {"enabled": true, "alias": null, "schema": "apple_search_ads_source", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "post-hook": [], "pre-hook": []}, "database": "postgres", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "fqn": ["apple_search_ads_source", "stg_apple_search_ads__keyword_history"], "unique_id": "model.apple_search_ads_source.stg_apple_search_ads__keyword_history", "package_name": "apple_search_ads_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "stg_apple_search_ads__keyword_history.sql", "original_file_path": "models/stg_apple_search_ads__keyword_history.sql", "name": "stg_apple_search_ads__keyword_history", "alias": "stg_apple_search_ads__keyword_history", "checksum": {"name": "sha256", "checksum": "5ee576e97a5fffaf97916376ca747fcb9389b6733d268f9b42308a8f244ade8e"}, "tags": [], "refs": [["stg_apple_search_ads__keyword_history_tmp"], ["stg_apple_search_ads__keyword_history_tmp"]], "sources": [], "description": "Each record represents a version of a keyword in Apple Search Ads.", "columns": {"modified_at": {"name": "modified_at", "description": "Timestamp of when the keyword object was last modified.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "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, "quote": null, "tags": []}, "keyword_id": {"name": "keyword_id", "description": "Keyword ID associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_id": {"name": "campaign_id", "description": "Campaign ID associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "ad_group_id": {"name": "ad_group_id", "description": "Ad group ID associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "bid_amount": {"name": "bid_amount", "description": "The bid amount to display your ad for the matching text value.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "bid_currency": {"name": "bid_currency", "description": "This currency value should match the respective organization's currency value.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "match_type": {"name": "match_type", "description": "Controls how ads are matched to user searches; EXACT or BROAD.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "status": {"name": "status", "description": "The current status of the keyword, values include ENABLED and PAUSED.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "keyword_text": {"name": "keyword_text", "description": "The word or phrase to match in user searches, to show respective ad.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "apple_search_ads_source://models/stg_apple_search_ads.yml", "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads__keyword_history.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "apple_search_ads_source", "materialized": "table", "enabled": true}, "created_at": 1661548509.121315, "compiled_sql": "\n\nwith base as (\n\n select * \n from \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__keyword_history_tmp\"\n),\n\nfields as (\n\n select\n \n cast(null as \n timestamp without time zone\n) as \n \n _fivetran_synced\n \n , \n \n \n ad_group_id\n \n as \n \n ad_group_id\n \n, \n \n \n bid_amount\n \n as \n \n bid_amount\n \n, \n \n \n bid_currency\n \n as \n \n bid_currency\n \n, \n \n \n campaign_id\n \n as \n \n campaign_id\n \n, \n \n \n deleted\n \n as \n \n deleted\n \n, \n \n \n id\n \n as \n \n id\n \n, \n \n \n match_type\n \n as \n \n match_type\n \n, \n \n \n modification_time\n \n as \n \n modification_time\n \n, \n \n \n status\n \n as \n \n status\n \n, \n \n \n text\n \n as \n \n text\n \n\n\n\n \n from base\n),\n\nfinal as (\n \n select \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": [], "relation_name": "\"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__keyword_history\""}, "model.apple_search_ads_source.stg_apple_search_ads__search_term_report": {"raw_sql": "{{ 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 from base\n),\n\nfinal as (\n \n select \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 new_downloads,\n redownloads\n\n {{ fivetran_utils.fill_pass_through_columns('apple_search_ads__search_term_passthrough_metrics') }}\n from fields\n)\n\nselect * \nfrom final", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.apple_search_ads_source.get_search_term_report_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.fill_pass_through_columns"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__search_term_report_tmp", "model.apple_search_ads_source.stg_apple_search_ads__search_term_report_tmp"]}, "config": {"enabled": true, "alias": null, "schema": "apple_search_ads_source", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "post-hook": [], "pre-hook": []}, "database": "postgres", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "fqn": ["apple_search_ads_source", "stg_apple_search_ads__search_term_report"], "unique_id": "model.apple_search_ads_source.stg_apple_search_ads__search_term_report", "package_name": "apple_search_ads_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "stg_apple_search_ads__search_term_report.sql", "original_file_path": "models/stg_apple_search_ads__search_term_report.sql", "name": "stg_apple_search_ads__search_term_report", "alias": "stg_apple_search_ads__search_term_report", "checksum": {"name": "sha256", "checksum": "6345a092b669f3283eb8b09b8590cdcf4e89da7ac486c18bb626315fac6db0e0"}, "tags": [], "refs": [["stg_apple_search_ads__search_term_report_tmp"], ["stg_apple_search_ads__search_term_report_tmp"]], "sources": [], "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, "quote": null, "tags": []}, "ad_group_id": {"name": "ad_group_id", "description": "Ad group ID associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "ad_format": {"name": "ad_format", "description": "Format of creative set.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_id": {"name": "campaign_id", "description": "Campaign ID associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "date_day": {"name": "date_day", "description": "Date for daily report aggregation.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "ad_group_name": {"name": "ad_group_name", "description": "Ad group name.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "bid_amount": {"name": "bid_amount", "description": "The bid amount to display your ad for the matching text value.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "bid_currency": {"name": "bid_currency", "description": "This currency value should match the respective organization's currency value.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "keyword_text": {"name": "keyword_text", "description": "The word or phrase to match in user searches, to show respective ad.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "keyword_display_status": {"name": "keyword_display_status", "description": "The keyword display status can either be ACTIVE or PAUSED.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "keyword_id": {"name": "keyword_id", "description": "Keyword ID associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "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, "quote": null, "tags": []}, "currency": {"name": "currency", "description": "This currency value should match the respective organization's currency value.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "match_type": {"name": "match_type", "description": "Controls how ads are matched to user searches; values include EXACT, BROAD or AUTO.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "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, "quote": null, "tags": []}, "search_term_text": {"name": "search_term_text", "description": "The word or phrase to match of user searches.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "impressions": {"name": "impressions", "description": "Number of times your ad appeared in App Store search results.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "taps": {"name": "taps", "description": "The number of times ad was tapped by users within the reporting time period.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "new_downloads": {"name": "new_downloads", "description": "App downloads from new users who have never before installed the respective app.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "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.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "apple_search_ads_source://models/stg_apple_search_ads.yml", "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads__search_term_report.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "apple_search_ads_source", "materialized": "table", "enabled": true}, "created_at": 1661548509.12654, "compiled_sql": "\n\nwith base as (\n\n select * \n from \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__search_term_report_tmp\"\n),\n\nfields as (\n\n select\n \n \n \n _fivetran_id\n \n as \n \n _fivetran_id\n \n, \n \n \n ad_group_deleted\n \n as \n \n ad_group_deleted\n \n, \n \n \n ad_group_id\n \n as \n \n ad_group_id\n \n, \n \n \n ad_group_name\n \n as \n \n ad_group_name\n \n, \n \n \n bid_amount_amount\n \n as \n \n bid_amount_amount\n \n, \n \n \n bid_amount_currency\n \n as \n \n bid_amount_currency\n \n, \n \n \n campaign_id\n \n as \n \n campaign_id\n \n, \n \n \n date\n \n as \n \n date\n \n, \n \n \n deleted\n \n as \n \n deleted\n \n, \n \n \n impressions\n \n as \n \n impressions\n \n, \n \n \n keyword\n \n as \n \n keyword\n \n, \n \n \n keyword_display_status\n \n as \n \n keyword_display_status\n \n, \n \n \n keyword_id\n \n as \n \n keyword_id\n \n, \n \n \n local_spend_amount\n \n as \n \n local_spend_amount\n \n, \n \n \n local_spend_currency\n \n as \n \n local_spend_currency\n \n, \n \n \n match_type\n \n as \n \n match_type\n \n, \n \n \n new_downloads\n \n as \n \n new_downloads\n \n, \n \n \n redownloads\n \n as \n \n redownloads\n \n, \n \n \n search_term_source\n \n as \n \n search_term_source\n \n, \n \n \n search_term_text\n \n as \n \n search_term_text\n \n, \n \n \n taps\n \n as \n \n taps\n \n\n\n\n from base\n),\n\nfinal as (\n \n select \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 new_downloads,\n redownloads\n\n \n\n\n\n\n from fields\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "\"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__search_term_report\""}, "model.apple_search_ads_source.stg_apple_search_ads__ad_group_history": {"raw_sql": "{{ 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 from base\n),\n\nfinal as (\n select \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", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.apple_search_ads_source.get_ad_group_history_columns", "macro.fivetran_utils.fill_staging_columns"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__ad_group_history_tmp", "model.apple_search_ads_source.stg_apple_search_ads__ad_group_history_tmp"]}, "config": {"enabled": true, "alias": null, "schema": "apple_search_ads_source", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "post-hook": [], "pre-hook": []}, "database": "postgres", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "fqn": ["apple_search_ads_source", "stg_apple_search_ads__ad_group_history"], "unique_id": "model.apple_search_ads_source.stg_apple_search_ads__ad_group_history", "package_name": "apple_search_ads_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "stg_apple_search_ads__ad_group_history.sql", "original_file_path": "models/stg_apple_search_ads__ad_group_history.sql", "name": "stg_apple_search_ads__ad_group_history", "alias": "stg_apple_search_ads__ad_group_history", "checksum": {"name": "sha256", "checksum": "b2081179706957545ca7818fd65e298a3948051372426039e2ecffd091fef371"}, "tags": [], "refs": [["stg_apple_search_ads__ad_group_history_tmp"], ["stg_apple_search_ads__ad_group_history_tmp"]], "sources": [], "description": "Each record represents a version of an ad group in Apple Search Ads.", "columns": {"modified_at": {"name": "modified_at", "description": "Timestamp of when the ad group object was last modified.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "is_most_recent_record": {"name": "is_most_recent_record", "description": "Boolean indicating whether record was the most recent instance.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "ad_group_id": {"name": "ad_group_id", "description": "Ad group ID associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_id": {"name": "campaign_id", "description": "Campaign ID associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "start_at": {"name": "start_at", "description": "The designated ad group start time.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "end_at": {"name": "end_at", "description": "The designated ad group end time.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "ad_group_name": {"name": "ad_group_name", "description": "Ad group name.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "organization_id": {"name": "organization_id", "description": "Organization ID associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "status": {"name": "status", "description": "The current status of the ad group, values include ENABLED and PAUSED.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "apple_search_ads_source://models/stg_apple_search_ads.yml", "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads__ad_group_history.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "apple_search_ads_source", "materialized": "table", "enabled": true}, "created_at": 1661548509.112394, "compiled_sql": "\n\nwith base as (\n\n select * \n from \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__ad_group_history_tmp\"\n),\n\nfields as (\n\n select\n \n cast(null as \n timestamp without time zone\n) as \n \n _fivetran_synced\n \n , \n \n \n automated_keywords_opt_in\n \n as \n \n automated_keywords_opt_in\n \n, \n \n \n campaign_id\n \n as \n \n campaign_id\n \n, \n \n \n cpa_goal_amount\n \n as \n \n cpa_goal_amount\n \n, \n \n \n cpa_goal_currency\n \n as \n \n cpa_goal_currency\n \n, \n \n \n default_cpc_bid_amount\n \n as \n \n default_cpc_bid_amount\n \n, \n \n \n default_cpc_bid_currency\n \n as \n \n default_cpc_bid_currency\n \n, \n \n \n deleted\n \n as \n \n deleted\n \n, \n \n \n end_time\n \n as \n \n end_time\n \n, \n \n \n id\n \n as \n \n id\n \n, \n \n \n modification_time\n \n as \n \n modification_time\n \n, \n \n \n name\n \n as \n \n name\n \n, \n \n \n organization_id\n \n as \n \n organization_id\n \n, \n \n \n serving_state_reasons\n \n as \n \n serving_state_reasons\n \n, \n \n \n serving_status\n \n as \n \n serving_status\n \n, \n \n \n start_time\n \n as \n \n start_time\n \n, \n \n \n status\n \n as \n \n status\n \n, \n \n \n storefronts\n \n as \n \n storefronts\n \n\n\n\n \n from base\n),\n\nfinal as (\n select \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": [], "relation_name": "\"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__ad_group_history\""}, "model.apple_search_ads_source.stg_apple_search_ads__ad_history": {"raw_sql": "{{ 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 from base\n),\n\nfinal as (\n \n select \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", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.apple_search_ads_source.get_ad_history_columns", "macro.fivetran_utils.fill_staging_columns"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__ad_history_tmp", "model.apple_search_ads_source.stg_apple_search_ads__ad_history_tmp"]}, "config": {"enabled": true, "alias": null, "schema": "apple_search_ads_source", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "post-hook": [], "pre-hook": []}, "database": "postgres", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "fqn": ["apple_search_ads_source", "stg_apple_search_ads__ad_history"], "unique_id": "model.apple_search_ads_source.stg_apple_search_ads__ad_history", "package_name": "apple_search_ads_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "stg_apple_search_ads__ad_history.sql", "original_file_path": "models/stg_apple_search_ads__ad_history.sql", "name": "stg_apple_search_ads__ad_history", "alias": "stg_apple_search_ads__ad_history", "checksum": {"name": "sha256", "checksum": "4abb76f80d87af32ba976747bb0accf3b1641854a41a3e9d8ebec94533405d23"}, "tags": [], "refs": [["stg_apple_search_ads__ad_history_tmp"], ["stg_apple_search_ads__ad_history_tmp"]], "sources": [], "description": "Each record represents a version of an ad in Apple Search Ads.", "columns": {"created_at": {"name": "created_at", "description": "Timestamp of when ad was created.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "modified_at": {"name": "modified_at", "description": "Timestamp of when the ad object was last modified.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "organization_id": {"name": "organization_id", "description": "Organization ID associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_id": {"name": "campaign_id", "description": "Campaign ID associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "ad_group_id": {"name": "ad_group_id", "description": "Ad group ID associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "ad_name": {"name": "ad_name", "description": "Ad name associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "ad_id": {"name": "ad_id", "description": "Ad ID associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "ad_status": {"name": "ad_status", "description": "The current status of the ad, values include ENABLED and PAUSED.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "apple_search_ads_source://models/stg_apple_search_ads.yml", "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads__ad_history.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "apple_search_ads_source", "materialized": "table", "enabled": true}, "created_at": 1661548509.115167, "compiled_sql": "\n\nwith base as (\n\n select * \n from \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__ad_history_tmp\"\n),\n\nfields as (\n\n select\n \n cast(null as \n timestamp without time zone\n) as \n \n _fivetran_synced\n \n , \n \n \n ad_group_id\n \n as \n \n ad_group_id\n \n, \n \n \n campaign_id\n \n as \n \n campaign_id\n \n, \n \n \n creation_time\n \n as \n \n creation_time\n \n, \n \n \n creative_id\n \n as \n \n creative_id\n \n, \n \n \n creative_type\n \n as \n \n creative_type\n \n, \n cast(null as boolean) as \n \n deleted\n \n , \n \n \n id\n \n as \n \n id\n \n, \n \n \n modification_time\n \n as \n \n modification_time\n \n, \n \n \n name\n \n as \n \n name\n \n, \n \n \n org_id\n \n as \n \n org_id\n \n, \n cast(null as \n varchar\n) as \n \n serving_status\n \n , \n \n \n status\n \n as \n \n status\n \n\n\n\n from base\n),\n\nfinal as (\n \n select \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": [], "relation_name": "\"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__ad_history\""}, "model.apple_search_ads_source.stg_apple_search_ads__ad_group_report": {"raw_sql": "{{ 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 from base\n),\n\nfinal as (\n \n select\n date as date_day, \n ad_group_id,\n impressions,\n local_spend_amount as spend,\n local_spend_currency as currency,\n new_downloads,\n redownloads,\n taps\n\n {{ fivetran_utils.fill_pass_through_columns('apple_search_ads__ad_group_passthrough_metrics') }}\n from fields\n)\n\nselect * \nfrom final", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.apple_search_ads_source.get_ad_group_report_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.fill_pass_through_columns"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__ad_group_report_tmp", "model.apple_search_ads_source.stg_apple_search_ads__ad_group_report_tmp"]}, "config": {"enabled": true, "alias": null, "schema": "apple_search_ads_source", "database": null, "tags": [], "meta": {}, "materialized": "table", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "post-hook": [], "pre-hook": []}, "database": "postgres", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "fqn": ["apple_search_ads_source", "stg_apple_search_ads__ad_group_report"], "unique_id": "model.apple_search_ads_source.stg_apple_search_ads__ad_group_report", "package_name": "apple_search_ads_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "stg_apple_search_ads__ad_group_report.sql", "original_file_path": "models/stg_apple_search_ads__ad_group_report.sql", "name": "stg_apple_search_ads__ad_group_report", "alias": "stg_apple_search_ads__ad_group_report", "checksum": {"name": "sha256", "checksum": "a6f8f1e79e88e2512acd90e2768436ef73939e82acd46b79c0775ba19865147d"}, "tags": [], "refs": [["stg_apple_search_ads__ad_group_report_tmp"], ["stg_apple_search_ads__ad_group_report_tmp"]], "sources": [], "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, "quote": null, "tags": []}, "date_day": {"name": "date_day", "description": "Date for daily report aggregation.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "impressions": {"name": "impressions", "description": "Number of times your ad appeared in App Store search results.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "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, "quote": null, "tags": []}, "currency": {"name": "currency", "description": "This currency value should match the respective organization's currency value.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "new_downloads": {"name": "new_downloads", "description": "App downloads from new users who have never before installed the respective app.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "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.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "taps": {"name": "taps", "description": "The number of times ad was tapped by users within the reporting time period.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "apple_search_ads_source://models/stg_apple_search_ads.yml", "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads__ad_group_report.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "apple_search_ads_source", "materialized": "table", "enabled": true}, "created_at": 1661548509.113842, "compiled_sql": "\n\nwith base as (\n\n select * \n from \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__ad_group_report_tmp\"\n),\n\nfields as (\n\n select\n \n \n \n ad_group_id\n \n as \n \n ad_group_id\n \n, \n \n \n date\n \n as \n \n date\n \n, \n \n \n impressions\n \n as \n \n impressions\n \n, \n \n \n local_spend_amount\n \n as \n \n local_spend_amount\n \n, \n \n \n local_spend_currency\n \n as \n \n local_spend_currency\n \n, \n \n \n new_downloads\n \n as \n \n new_downloads\n \n, \n \n \n redownloads\n \n as \n \n redownloads\n \n, \n \n \n taps\n \n as \n \n taps\n \n\n\n\n from base\n),\n\nfinal as (\n \n select\n date as date_day, \n ad_group_id,\n impressions,\n local_spend_amount as spend,\n local_spend_currency as currency,\n new_downloads,\n redownloads,\n taps\n\n \n\n\n\n\n from fields\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "\"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__ad_group_report\""}, "model.apple_search_ads_source.stg_apple_search_ads__search_term_report_tmp": {"raw_sql": "{{ config(enabled=fivetran_utils.enabled_vars(['ad_reporting__apple_search_ads_enabled','apple_search_ads__using_search_terms'])) }}\n\nselect * \nfrom {{ var('search_term_report') }}", "compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars"], "nodes": ["source.apple_search_ads_source.apple_search_ads.search_term_report"]}, "config": {"enabled": true, "alias": null, "schema": "apple_search_ads_source", "database": null, "tags": [], "meta": {}, "materialized": "view", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "post-hook": [], "pre-hook": []}, "database": "postgres", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "fqn": ["apple_search_ads_source", "tmp", "stg_apple_search_ads__search_term_report_tmp"], "unique_id": "model.apple_search_ads_source.stg_apple_search_ads__search_term_report_tmp", "package_name": "apple_search_ads_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "tmp/stg_apple_search_ads__search_term_report_tmp.sql", "original_file_path": "models/tmp/stg_apple_search_ads__search_term_report_tmp.sql", "name": "stg_apple_search_ads__search_term_report_tmp", "alias": "stg_apple_search_ads__search_term_report_tmp", "checksum": {"name": "sha256", "checksum": "86f6e99ff5c0373cf5ec106d4011966278601cb5350d588466564e2dca2fa951"}, "tags": [], "refs": [], "sources": [["apple_search_ads", "search_term_report"]], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/tmp/stg_apple_search_ads__search_term_report_tmp.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "apple_search_ads_source", "materialized": "view", "enabled": true}, "created_at": 1661548508.977289, "compiled_sql": "\n\nselect * \nfrom \"postgres\".\"apple_search_ads_integration_tests\".\"search_term_report_data\"", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "\"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__search_term_report_tmp\""}, "model.apple_search_ads_source.stg_apple_search_ads__campaign_history_tmp": {"raw_sql": "{{ config(enabled=var('ad_reporting__apple_search_ads_enabled', True)) }}\n\nselect * \nfrom {{ var('campaign_history') }}", "compiled": true, "resource_type": "model", "depends_on": {"macros": [], "nodes": ["source.apple_search_ads_source.apple_search_ads.campaign_history"]}, "config": {"enabled": true, "alias": null, "schema": "apple_search_ads_source", "database": null, "tags": [], "meta": {}, "materialized": "view", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "post-hook": [], "pre-hook": []}, "database": "postgres", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "fqn": ["apple_search_ads_source", "tmp", "stg_apple_search_ads__campaign_history_tmp"], "unique_id": "model.apple_search_ads_source.stg_apple_search_ads__campaign_history_tmp", "package_name": "apple_search_ads_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "tmp/stg_apple_search_ads__campaign_history_tmp.sql", "original_file_path": "models/tmp/stg_apple_search_ads__campaign_history_tmp.sql", "name": "stg_apple_search_ads__campaign_history_tmp", "alias": "stg_apple_search_ads__campaign_history_tmp", "checksum": {"name": "sha256", "checksum": "e23c062d3d75b890a717ab4047e5a0dccf7c098b3927935df02f76c17acb3ea7"}, "tags": [], "refs": [], "sources": [["apple_search_ads", "campaign_history"]], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/tmp/stg_apple_search_ads__campaign_history_tmp.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "apple_search_ads_source", "materialized": "view", "enabled": true}, "created_at": 1661548508.9809752, "compiled_sql": "\n\nselect * \nfrom \"postgres\".\"apple_search_ads_integration_tests\".\"campaign_history_data\"", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "\"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__campaign_history_tmp\""}, "model.apple_search_ads_source.stg_apple_search_ads__keyword_history_tmp": {"raw_sql": "{{ config(enabled=var('ad_reporting__apple_search_ads_enabled', True)) }}\n\nselect * \nfrom {{ var('keyword_history') }}", "compiled": true, "resource_type": "model", "depends_on": {"macros": [], "nodes": ["source.apple_search_ads_source.apple_search_ads.keyword_history"]}, "config": {"enabled": true, "alias": null, "schema": "apple_search_ads_source", "database": null, "tags": [], "meta": {}, "materialized": "view", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "post-hook": [], "pre-hook": []}, "database": "postgres", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "fqn": ["apple_search_ads_source", "tmp", "stg_apple_search_ads__keyword_history_tmp"], "unique_id": "model.apple_search_ads_source.stg_apple_search_ads__keyword_history_tmp", "package_name": "apple_search_ads_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "tmp/stg_apple_search_ads__keyword_history_tmp.sql", "original_file_path": "models/tmp/stg_apple_search_ads__keyword_history_tmp.sql", "name": "stg_apple_search_ads__keyword_history_tmp", "alias": "stg_apple_search_ads__keyword_history_tmp", "checksum": {"name": "sha256", "checksum": "852fa9ece91c72dd36f654ce0d71f2af4a1707385c0fa00e3d68e206e4ac456b"}, "tags": [], "refs": [], "sources": [["apple_search_ads", "keyword_history"]], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/tmp/stg_apple_search_ads__keyword_history_tmp.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "apple_search_ads_source", "materialized": "view", "enabled": true}, "created_at": 1661548508.9862, "compiled_sql": "\n\nselect * \nfrom \"postgres\".\"apple_search_ads_integration_tests\".\"keyword_history_data\"", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "\"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__keyword_history_tmp\""}, "model.apple_search_ads_source.stg_apple_search_ads__ad_group_history_tmp": {"raw_sql": "{{ config(enabled=var('ad_reporting__apple_search_ads_enabled', True)) }}\n\nselect * \nfrom {{ var('ad_group_history') }}", "compiled": true, "resource_type": "model", "depends_on": {"macros": [], "nodes": ["source.apple_search_ads_source.apple_search_ads.ad_group_history"]}, "config": {"enabled": true, "alias": null, "schema": "apple_search_ads_source", "database": null, "tags": [], "meta": {}, "materialized": "view", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "post-hook": [], "pre-hook": []}, "database": "postgres", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "fqn": ["apple_search_ads_source", "tmp", "stg_apple_search_ads__ad_group_history_tmp"], "unique_id": "model.apple_search_ads_source.stg_apple_search_ads__ad_group_history_tmp", "package_name": "apple_search_ads_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "tmp/stg_apple_search_ads__ad_group_history_tmp.sql", "original_file_path": "models/tmp/stg_apple_search_ads__ad_group_history_tmp.sql", "name": "stg_apple_search_ads__ad_group_history_tmp", "alias": "stg_apple_search_ads__ad_group_history_tmp", "checksum": {"name": "sha256", "checksum": "69317b26b7a3c109c0e5e61d7fdad053cb0549479a0dfdacd0d67ff0757cc97e"}, "tags": [], "refs": [], "sources": [["apple_search_ads", "ad_group_history"]], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/tmp/stg_apple_search_ads__ad_group_history_tmp.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "apple_search_ads_source", "materialized": "view", "enabled": true}, "created_at": 1661548508.991523, "compiled_sql": "\n\nselect * \nfrom \"postgres\".\"apple_search_ads_integration_tests\".\"ad_group_history_data\"", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "\"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__ad_group_history_tmp\""}, "model.apple_search_ads_source.stg_apple_search_ads__ad_group_report_tmp": {"raw_sql": "{{ config(enabled=var('ad_reporting__apple_search_ads_enabled', True)) }}\n\nselect * \nfrom {{ var('ad_group_report') }}", "compiled": true, "resource_type": "model", "depends_on": {"macros": [], "nodes": ["source.apple_search_ads_source.apple_search_ads.ad_group_report"]}, "config": {"enabled": true, "alias": null, "schema": "apple_search_ads_source", "database": null, "tags": [], "meta": {}, "materialized": "view", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "post-hook": [], "pre-hook": []}, "database": "postgres", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "fqn": ["apple_search_ads_source", "tmp", "stg_apple_search_ads__ad_group_report_tmp"], "unique_id": "model.apple_search_ads_source.stg_apple_search_ads__ad_group_report_tmp", "package_name": "apple_search_ads_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "tmp/stg_apple_search_ads__ad_group_report_tmp.sql", "original_file_path": "models/tmp/stg_apple_search_ads__ad_group_report_tmp.sql", "name": "stg_apple_search_ads__ad_group_report_tmp", "alias": "stg_apple_search_ads__ad_group_report_tmp", "checksum": {"name": "sha256", "checksum": "91089253c95dee7d0aea3f9b8cc49cf343c2d06acf0de36641ebaef03e1d2b1b"}, "tags": [], "refs": [], "sources": [["apple_search_ads", "ad_group_report"]], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/tmp/stg_apple_search_ads__ad_group_report_tmp.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "apple_search_ads_source", "materialized": "view", "enabled": true}, "created_at": 1661548508.994876, "compiled_sql": "\n\nselect * \nfrom \"postgres\".\"apple_search_ads_integration_tests\".\"ad_group_report_data\"", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "\"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__ad_group_report_tmp\""}, "model.apple_search_ads_source.stg_apple_search_ads__ad_history_tmp": {"raw_sql": "{{ config(enabled=var('ad_reporting__apple_search_ads_enabled', True)) }}\n\nselect * \nfrom {{ var('ad_history') }}", "compiled": true, "resource_type": "model", "depends_on": {"macros": [], "nodes": ["source.apple_search_ads_source.apple_search_ads.ad_history"]}, "config": {"enabled": true, "alias": null, "schema": "apple_search_ads_source", "database": null, "tags": [], "meta": {}, "materialized": "view", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "post-hook": [], "pre-hook": []}, "database": "postgres", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "fqn": ["apple_search_ads_source", "tmp", "stg_apple_search_ads__ad_history_tmp"], "unique_id": "model.apple_search_ads_source.stg_apple_search_ads__ad_history_tmp", "package_name": "apple_search_ads_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "tmp/stg_apple_search_ads__ad_history_tmp.sql", "original_file_path": "models/tmp/stg_apple_search_ads__ad_history_tmp.sql", "name": "stg_apple_search_ads__ad_history_tmp", "alias": "stg_apple_search_ads__ad_history_tmp", "checksum": {"name": "sha256", "checksum": "7b184af2299b7d42defa4606467cf9bf379e10cec768bf1e5825c040dbdfacb8"}, "tags": [], "refs": [], "sources": [["apple_search_ads", "ad_history"]], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/tmp/stg_apple_search_ads__ad_history_tmp.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "apple_search_ads_source", "materialized": "view", "enabled": true}, "created_at": 1661548508.998723, "compiled_sql": "\n\nselect * \nfrom \"postgres\".\"apple_search_ads_integration_tests\".\"ad_history_data\"", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "\"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__ad_history_tmp\""}, "model.apple_search_ads_source.stg_apple_search_ads__campaign_report_tmp": {"raw_sql": "{{ config(enabled=var('ad_reporting__apple_search_ads_enabled', True)) }}\n\nselect * \nfrom {{ var('campaign_report') }}", "compiled": true, "resource_type": "model", "depends_on": {"macros": [], "nodes": ["source.apple_search_ads_source.apple_search_ads.campaign_report"]}, "config": {"enabled": true, "alias": null, "schema": "apple_search_ads_source", "database": null, "tags": [], "meta": {}, "materialized": "view", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "post-hook": [], "pre-hook": []}, "database": "postgres", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "fqn": ["apple_search_ads_source", "tmp", "stg_apple_search_ads__campaign_report_tmp"], "unique_id": "model.apple_search_ads_source.stg_apple_search_ads__campaign_report_tmp", "package_name": "apple_search_ads_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "tmp/stg_apple_search_ads__campaign_report_tmp.sql", "original_file_path": "models/tmp/stg_apple_search_ads__campaign_report_tmp.sql", "name": "stg_apple_search_ads__campaign_report_tmp", "alias": "stg_apple_search_ads__campaign_report_tmp", "checksum": {"name": "sha256", "checksum": "ae8d95be0097305356d0ba251d324d35bbe367edcf342c958f69fea9f89625f2"}, "tags": [], "refs": [], "sources": [["apple_search_ads", "campaign_report"]], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/tmp/stg_apple_search_ads__campaign_report_tmp.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "apple_search_ads_source", "materialized": "view", "enabled": true}, "created_at": 1661548509.0031118, "compiled_sql": "\n\nselect * \nfrom \"postgres\".\"apple_search_ads_integration_tests\".\"campaign_report_data\"", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "\"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__campaign_report_tmp\""}, "model.apple_search_ads_source.stg_apple_search_ads__organization_tmp": {"raw_sql": "{{ config(enabled=var('ad_reporting__apple_search_ads_enabled', True)) }}\n\nselect * \nfrom {{ var('organization') }}", "compiled": true, "resource_type": "model", "depends_on": {"macros": [], "nodes": ["source.apple_search_ads_source.apple_search_ads.organization"]}, "config": {"enabled": true, "alias": null, "schema": "apple_search_ads_source", "database": null, "tags": [], "meta": {}, "materialized": "view", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "post-hook": [], "pre-hook": []}, "database": "postgres", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "fqn": ["apple_search_ads_source", "tmp", "stg_apple_search_ads__organization_tmp"], "unique_id": "model.apple_search_ads_source.stg_apple_search_ads__organization_tmp", "package_name": "apple_search_ads_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "tmp/stg_apple_search_ads__organization_tmp.sql", "original_file_path": "models/tmp/stg_apple_search_ads__organization_tmp.sql", "name": "stg_apple_search_ads__organization_tmp", "alias": "stg_apple_search_ads__organization_tmp", "checksum": {"name": "sha256", "checksum": "4a62af784e819ec6034aa89fe16019f027c9994b192426e70bcf18bda3d117a9"}, "tags": [], "refs": [], "sources": [["apple_search_ads", "organization"]], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/tmp/stg_apple_search_ads__organization_tmp.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "apple_search_ads_source", "materialized": "view", "enabled": true}, "created_at": 1661548509.0067809, "compiled_sql": "\n\nselect * \nfrom \"postgres\".\"apple_search_ads_integration_tests\".\"organization_data\"", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "\"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__organization_tmp\""}, "model.apple_search_ads_source.stg_apple_search_ads__keyword_report_tmp": {"raw_sql": "{{ config(enabled=var('ad_reporting__apple_search_ads_enabled', True)) }}\n\nselect * \nfrom {{ var('keyword_report') }}", "compiled": true, "resource_type": "model", "depends_on": {"macros": [], "nodes": ["source.apple_search_ads_source.apple_search_ads.keyword_report"]}, "config": {"enabled": true, "alias": null, "schema": "apple_search_ads_source", "database": null, "tags": [], "meta": {}, "materialized": "view", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "post-hook": [], "pre-hook": []}, "database": "postgres", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "fqn": ["apple_search_ads_source", "tmp", "stg_apple_search_ads__keyword_report_tmp"], "unique_id": "model.apple_search_ads_source.stg_apple_search_ads__keyword_report_tmp", "package_name": "apple_search_ads_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "tmp/stg_apple_search_ads__keyword_report_tmp.sql", "original_file_path": "models/tmp/stg_apple_search_ads__keyword_report_tmp.sql", "name": "stg_apple_search_ads__keyword_report_tmp", "alias": "stg_apple_search_ads__keyword_report_tmp", "checksum": {"name": "sha256", "checksum": "5009b770850f4f2648d5498a78b1491e6a44250d9ac2d7c08c249e8624f517f2"}, "tags": [], "refs": [], "sources": [["apple_search_ads", "keyword_report"]], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/tmp/stg_apple_search_ads__keyword_report_tmp.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "apple_search_ads_source", "materialized": "view", "enabled": true}, "created_at": 1661548509.011928, "compiled_sql": "\n\nselect * \nfrom \"postgres\".\"apple_search_ads_integration_tests\".\"keyword_report_data\"", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "\"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__keyword_report_tmp\""}, "model.apple_search_ads_source.stg_apple_search_ads__ad_report_tmp": {"raw_sql": "{{ config(enabled=var('ad_reporting__apple_search_ads_enabled', True)) }}\n\nselect * \nfrom {{ var('ad_report') }}", "compiled": true, "resource_type": "model", "depends_on": {"macros": [], "nodes": ["source.apple_search_ads_source.apple_search_ads.ad_level_report"]}, "config": {"enabled": true, "alias": null, "schema": "apple_search_ads_source", "database": null, "tags": [], "meta": {}, "materialized": "view", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "on_schema_change": "ignore", "post-hook": [], "pre-hook": []}, "database": "postgres", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "fqn": ["apple_search_ads_source", "tmp", "stg_apple_search_ads__ad_report_tmp"], "unique_id": "model.apple_search_ads_source.stg_apple_search_ads__ad_report_tmp", "package_name": "apple_search_ads_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "tmp/stg_apple_search_ads__ad_report_tmp.sql", "original_file_path": "models/tmp/stg_apple_search_ads__ad_report_tmp.sql", "name": "stg_apple_search_ads__ad_report_tmp", "alias": "stg_apple_search_ads__ad_report_tmp", "checksum": {"name": "sha256", "checksum": "1744a47e20045a53726079456f5aba358e0292dd8a14d670e6ab7b2c30ece7ee"}, "tags": [], "refs": [], "sources": [["apple_search_ads", "ad_level_report"]], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/tmp/stg_apple_search_ads__ad_report_tmp.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "apple_search_ads_source", "materialized": "view", "enabled": true}, "created_at": 1661548509.0152051, "compiled_sql": "\n\nselect * \nfrom \"postgres\".\"apple_search_ads_integration_tests\".\"ad_report_data\"", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "\"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__ad_report_tmp\""}, "test.apple_search_ads.not_null_apple_search_ads__ad_group_report_ad_group_id.60febec6b5": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "ad_group_id", "model": "{{ get_where_subquery(ref('apple_search_ads__ad_group_report')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads.apple_search_ads__ad_group_report"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "postgres", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads", "not_null_apple_search_ads__ad_group_report_ad_group_id"], "unique_id": "test.apple_search_ads.not_null_apple_search_ads__ad_group_report_ad_group_id.60febec6b5", "package_name": "apple_search_ads", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads", "path": "not_null_apple_search_ads__ad_group_report_ad_group_id.sql", "original_file_path": "models/apple_search_ads.yml", "name": "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": ""}, "tags": [], "refs": [["apple_search_ads__ad_group_report"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads/models/apple_search_ads.yml/not_null_apple_search_ads__ad_group_report_ad_group_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1661548509.046082, "compiled_sql": "\n \n \n\nselect *\nfrom \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads\".\"apple_search_ads__ad_group_report\"\nwhere ad_group_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "ad_group_id", "file_key_name": "models.apple_search_ads__ad_group_report"}, "test.apple_search_ads.not_null_apple_search_ads__ad_group_report_date_day.e6ffb30b3c": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('apple_search_ads__ad_group_report')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads.apple_search_ads__ad_group_report"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "postgres", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads", "not_null_apple_search_ads__ad_group_report_date_day"], "unique_id": "test.apple_search_ads.not_null_apple_search_ads__ad_group_report_date_day.e6ffb30b3c", "package_name": "apple_search_ads", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads", "path": "not_null_apple_search_ads__ad_group_report_date_day.sql", "original_file_path": "models/apple_search_ads.yml", "name": "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": ""}, "tags": [], "refs": [["apple_search_ads__ad_group_report"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads/models/apple_search_ads.yml/not_null_apple_search_ads__ad_group_report_date_day.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1661548509.047703, "compiled_sql": "\n \n \n\nselect *\nfrom \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads\".\"apple_search_ads__ad_group_report\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "date_day", "file_key_name": "models.apple_search_ads__ad_group_report"}, "test.apple_search_ads.dbt_utils_unique_combination_of_columns_apple_search_ads__ad_group_report_organization_id__campaign_id__ad_group_id__date_day.19d180bab9": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_36b2ef766b4fc10b364ed4744c94afb2\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["organization_id", "campaign_id", "ad_group_id", "date_day"], "model": "{{ get_where_subquery(ref('apple_search_ads__ad_group_report')) }}"}, "namespace": "dbt_utils"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_utils.test_unique_combination_of_columns", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads.apple_search_ads__ad_group_report"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_36b2ef766b4fc10b364ed4744c94afb2", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "postgres", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads", "dbt_utils_unique_combination_of_columns_apple_search_ads__ad_group_report_organization_id__campaign_id__ad_group_id__date_day"], "unique_id": "test.apple_search_ads.dbt_utils_unique_combination_of_columns_apple_search_ads__ad_group_report_organization_id__campaign_id__ad_group_id__date_day.19d180bab9", "package_name": "apple_search_ads", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads", "path": "dbt_utils_unique_combination_o_36b2ef766b4fc10b364ed4744c94afb2.sql", "original_file_path": "models/apple_search_ads.yml", "name": "dbt_utils_unique_combination_of_columns_apple_search_ads__ad_group_report_organization_id__campaign_id__ad_group_id__date_day", "alias": "dbt_utils_unique_combination_o_36b2ef766b4fc10b364ed4744c94afb2", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["apple_search_ads__ad_group_report"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads/models/apple_search_ads.yml/dbt_utils_unique_combination_o_36b2ef766b4fc10b364ed4744c94afb2.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_36b2ef766b4fc10b364ed4744c94afb2"}, "created_at": 1661548509.048971, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n organization_id, campaign_id, ad_group_id, date_day\n from \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads\".\"apple_search_ads__ad_group_report\"\n group by organization_id, campaign_id, ad_group_id, date_day\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": null, "file_key_name": "models.apple_search_ads__ad_group_report"}, "test.apple_search_ads.not_null_apple_search_ads__ad_report_ad_id.0ab2c5075c": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "ad_id", "model": "{{ get_where_subquery(ref('apple_search_ads__ad_report')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads.apple_search_ads__ad_report"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "postgres", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads", "not_null_apple_search_ads__ad_report_ad_id"], "unique_id": "test.apple_search_ads.not_null_apple_search_ads__ad_report_ad_id.0ab2c5075c", "package_name": "apple_search_ads", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads", "path": "not_null_apple_search_ads__ad_report_ad_id.sql", "original_file_path": "models/apple_search_ads.yml", "name": "not_null_apple_search_ads__ad_report_ad_id", "alias": "not_null_apple_search_ads__ad_report_ad_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["apple_search_ads__ad_report"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads/models/apple_search_ads.yml/not_null_apple_search_ads__ad_report_ad_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1661548509.0573912, "compiled_sql": "\n \n \n\nselect *\nfrom \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads\".\"apple_search_ads__ad_report\"\nwhere ad_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "ad_id", "file_key_name": "models.apple_search_ads__ad_report"}, "test.apple_search_ads.not_null_apple_search_ads__ad_report_date_day.b86c049e17": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('apple_search_ads__ad_report')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads.apple_search_ads__ad_report"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "postgres", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads", "not_null_apple_search_ads__ad_report_date_day"], "unique_id": "test.apple_search_ads.not_null_apple_search_ads__ad_report_date_day.b86c049e17", "package_name": "apple_search_ads", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads", "path": "not_null_apple_search_ads__ad_report_date_day.sql", "original_file_path": "models/apple_search_ads.yml", "name": "not_null_apple_search_ads__ad_report_date_day", "alias": "not_null_apple_search_ads__ad_report_date_day", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["apple_search_ads__ad_report"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads/models/apple_search_ads.yml/not_null_apple_search_ads__ad_report_date_day.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1661548509.0584981, "compiled_sql": "\n \n \n\nselect *\nfrom \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads\".\"apple_search_ads__ad_report\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "date_day", "file_key_name": "models.apple_search_ads__ad_report"}, "test.apple_search_ads.dbt_utils_unique_combination_of_columns_apple_search_ads__ad_report_organization_id__campaign_id__ad_group_id__ad_id__date_day.54e27817a1": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_bd72aacf9db10be434541a5eb54a963c\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["organization_id", "campaign_id", "ad_group_id", "ad_id", "date_day"], "model": "{{ get_where_subquery(ref('apple_search_ads__ad_report')) }}"}, "namespace": "dbt_utils"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_utils.test_unique_combination_of_columns", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads.apple_search_ads__ad_report"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_bd72aacf9db10be434541a5eb54a963c", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "postgres", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads", "dbt_utils_unique_combination_of_columns_apple_search_ads__ad_report_organization_id__campaign_id__ad_group_id__ad_id__date_day"], "unique_id": "test.apple_search_ads.dbt_utils_unique_combination_of_columns_apple_search_ads__ad_report_organization_id__campaign_id__ad_group_id__ad_id__date_day.54e27817a1", "package_name": "apple_search_ads", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads", "path": "dbt_utils_unique_combination_o_bd72aacf9db10be434541a5eb54a963c.sql", "original_file_path": "models/apple_search_ads.yml", "name": "dbt_utils_unique_combination_of_columns_apple_search_ads__ad_report_organization_id__campaign_id__ad_group_id__ad_id__date_day", "alias": "dbt_utils_unique_combination_o_bd72aacf9db10be434541a5eb54a963c", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["apple_search_ads__ad_report"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads/models/apple_search_ads.yml/dbt_utils_unique_combination_o_bd72aacf9db10be434541a5eb54a963c.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_bd72aacf9db10be434541a5eb54a963c"}, "created_at": 1661548509.0596921, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n organization_id, campaign_id, ad_group_id, ad_id, date_day\n from \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads\".\"apple_search_ads__ad_report\"\n group by organization_id, campaign_id, ad_group_id, ad_id, date_day\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": null, "file_key_name": "models.apple_search_ads__ad_report"}, "test.apple_search_ads.not_null_apple_search_ads__campaign_report_campaign_id.e26ed1e146": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "campaign_id", "model": "{{ get_where_subquery(ref('apple_search_ads__campaign_report')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads.apple_search_ads__campaign_report"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "postgres", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads", "not_null_apple_search_ads__campaign_report_campaign_id"], "unique_id": "test.apple_search_ads.not_null_apple_search_ads__campaign_report_campaign_id.e26ed1e146", "package_name": "apple_search_ads", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads", "path": "not_null_apple_search_ads__campaign_report_campaign_id.sql", "original_file_path": "models/apple_search_ads.yml", "name": "not_null_apple_search_ads__campaign_report_campaign_id", "alias": "not_null_apple_search_ads__campaign_report_campaign_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["apple_search_ads__campaign_report"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads/models/apple_search_ads.yml/not_null_apple_search_ads__campaign_report_campaign_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1661548509.0631301, "compiled_sql": "\n \n \n\nselect *\nfrom \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads\".\"apple_search_ads__campaign_report\"\nwhere campaign_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "campaign_id", "file_key_name": "models.apple_search_ads__campaign_report"}, "test.apple_search_ads.not_null_apple_search_ads__campaign_report_date_day.35652b8d1a": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('apple_search_ads__campaign_report')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads.apple_search_ads__campaign_report"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "postgres", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads", "not_null_apple_search_ads__campaign_report_date_day"], "unique_id": "test.apple_search_ads.not_null_apple_search_ads__campaign_report_date_day.35652b8d1a", "package_name": "apple_search_ads", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads", "path": "not_null_apple_search_ads__campaign_report_date_day.sql", "original_file_path": "models/apple_search_ads.yml", "name": "not_null_apple_search_ads__campaign_report_date_day", "alias": "not_null_apple_search_ads__campaign_report_date_day", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["apple_search_ads__campaign_report"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads/models/apple_search_ads.yml/not_null_apple_search_ads__campaign_report_date_day.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1661548509.064171, "compiled_sql": "\n \n \n\nselect *\nfrom \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads\".\"apple_search_ads__campaign_report\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "date_day", "file_key_name": "models.apple_search_ads__campaign_report"}, "test.apple_search_ads.dbt_utils_unique_combination_of_columns_apple_search_ads__campaign_report_organization_id__campaign_id__date_day.647e56213f": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_3acbf89c4e0b6809bc53bfa9067d89c5\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["organization_id", "campaign_id", "date_day"], "model": "{{ get_where_subquery(ref('apple_search_ads__campaign_report')) }}"}, "namespace": "dbt_utils"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_utils.test_unique_combination_of_columns", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads.apple_search_ads__campaign_report"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_3acbf89c4e0b6809bc53bfa9067d89c5", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "postgres", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads", "dbt_utils_unique_combination_of_columns_apple_search_ads__campaign_report_organization_id__campaign_id__date_day"], "unique_id": "test.apple_search_ads.dbt_utils_unique_combination_of_columns_apple_search_ads__campaign_report_organization_id__campaign_id__date_day.647e56213f", "package_name": "apple_search_ads", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads", "path": "dbt_utils_unique_combination_o_3acbf89c4e0b6809bc53bfa9067d89c5.sql", "original_file_path": "models/apple_search_ads.yml", "name": "dbt_utils_unique_combination_of_columns_apple_search_ads__campaign_report_organization_id__campaign_id__date_day", "alias": "dbt_utils_unique_combination_o_3acbf89c4e0b6809bc53bfa9067d89c5", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["apple_search_ads__campaign_report"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads/models/apple_search_ads.yml/dbt_utils_unique_combination_o_3acbf89c4e0b6809bc53bfa9067d89c5.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_3acbf89c4e0b6809bc53bfa9067d89c5"}, "created_at": 1661548509.0652008, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n organization_id, campaign_id, date_day\n from \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads\".\"apple_search_ads__campaign_report\"\n group by organization_id, campaign_id, date_day\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": null, "file_key_name": "models.apple_search_ads__campaign_report"}, "test.apple_search_ads.not_null_apple_search_ads__keyword_report_keyword_id.ea493710db": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "keyword_id", "model": "{{ get_where_subquery(ref('apple_search_ads__keyword_report')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads.apple_search_ads__keyword_report"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "postgres", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads", "not_null_apple_search_ads__keyword_report_keyword_id"], "unique_id": "test.apple_search_ads.not_null_apple_search_ads__keyword_report_keyword_id.ea493710db", "package_name": "apple_search_ads", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads", "path": "not_null_apple_search_ads__keyword_report_keyword_id.sql", "original_file_path": "models/apple_search_ads.yml", "name": "not_null_apple_search_ads__keyword_report_keyword_id", "alias": "not_null_apple_search_ads__keyword_report_keyword_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["apple_search_ads__keyword_report"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads/models/apple_search_ads.yml/not_null_apple_search_ads__keyword_report_keyword_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1661548509.068446, "compiled_sql": "\n \n \n\nselect *\nfrom \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads\".\"apple_search_ads__keyword_report\"\nwhere keyword_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "keyword_id", "file_key_name": "models.apple_search_ads__keyword_report"}, "test.apple_search_ads.not_null_apple_search_ads__keyword_report_date_day.3dec8d0e82": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('apple_search_ads__keyword_report')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads.apple_search_ads__keyword_report"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "postgres", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads", "not_null_apple_search_ads__keyword_report_date_day"], "unique_id": "test.apple_search_ads.not_null_apple_search_ads__keyword_report_date_day.3dec8d0e82", "package_name": "apple_search_ads", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads", "path": "not_null_apple_search_ads__keyword_report_date_day.sql", "original_file_path": "models/apple_search_ads.yml", "name": "not_null_apple_search_ads__keyword_report_date_day", "alias": "not_null_apple_search_ads__keyword_report_date_day", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["apple_search_ads__keyword_report"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads/models/apple_search_ads.yml/not_null_apple_search_ads__keyword_report_date_day.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1661548509.069728, "compiled_sql": "\n \n \n\nselect *\nfrom \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads\".\"apple_search_ads__keyword_report\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "date_day", "file_key_name": "models.apple_search_ads__keyword_report"}, "test.apple_search_ads.dbt_utils_unique_combination_of_columns_apple_search_ads__keyword_report_organization_id__campaign_id__ad_group_id__keyword_id__date_day.78fb033a13": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_533c8551a101baa56c397525cb8a9246\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["organization_id", "campaign_id", "ad_group_id", "keyword_id", "date_day"], "model": "{{ get_where_subquery(ref('apple_search_ads__keyword_report')) }}"}, "namespace": "dbt_utils"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_utils.test_unique_combination_of_columns", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads.apple_search_ads__keyword_report"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_533c8551a101baa56c397525cb8a9246", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "postgres", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads", "dbt_utils_unique_combination_of_columns_apple_search_ads__keyword_report_organization_id__campaign_id__ad_group_id__keyword_id__date_day"], "unique_id": "test.apple_search_ads.dbt_utils_unique_combination_of_columns_apple_search_ads__keyword_report_organization_id__campaign_id__ad_group_id__keyword_id__date_day.78fb033a13", "package_name": "apple_search_ads", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads", "path": "dbt_utils_unique_combination_o_533c8551a101baa56c397525cb8a9246.sql", "original_file_path": "models/apple_search_ads.yml", "name": "dbt_utils_unique_combination_of_columns_apple_search_ads__keyword_report_organization_id__campaign_id__ad_group_id__keyword_id__date_day", "alias": "dbt_utils_unique_combination_o_533c8551a101baa56c397525cb8a9246", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["apple_search_ads__keyword_report"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads/models/apple_search_ads.yml/dbt_utils_unique_combination_o_533c8551a101baa56c397525cb8a9246.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_533c8551a101baa56c397525cb8a9246"}, "created_at": 1661548509.070815, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n organization_id, campaign_id, ad_group_id, keyword_id, date_day\n from \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads\".\"apple_search_ads__keyword_report\"\n group by organization_id, campaign_id, ad_group_id, keyword_id, date_day\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": null, "file_key_name": "models.apple_search_ads__keyword_report"}, "test.apple_search_ads.not_null_apple_search_ads__organization_report_organization_id.b6cf7d69f8": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "organization_id", "model": "{{ get_where_subquery(ref('apple_search_ads__organization_report')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads.apple_search_ads__organization_report"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "postgres", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads", "not_null_apple_search_ads__organization_report_organization_id"], "unique_id": "test.apple_search_ads.not_null_apple_search_ads__organization_report_organization_id.b6cf7d69f8", "package_name": "apple_search_ads", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads", "path": "not_null_apple_search_ads__organization_report_organization_id.sql", "original_file_path": "models/apple_search_ads.yml", "name": "not_null_apple_search_ads__organization_report_organization_id", "alias": "not_null_apple_search_ads__organization_report_organization_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["apple_search_ads__organization_report"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads/models/apple_search_ads.yml/not_null_apple_search_ads__organization_report_organization_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1661548509.074466, "compiled_sql": "\n \n \n\nselect *\nfrom \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads\".\"apple_search_ads__organization_report\"\nwhere organization_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "organization_id", "file_key_name": "models.apple_search_ads__organization_report"}, "test.apple_search_ads.not_null_apple_search_ads__organization_report_date_day.5784fed523": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('apple_search_ads__organization_report')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads.apple_search_ads__organization_report"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "postgres", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads", "not_null_apple_search_ads__organization_report_date_day"], "unique_id": "test.apple_search_ads.not_null_apple_search_ads__organization_report_date_day.5784fed523", "package_name": "apple_search_ads", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads", "path": "not_null_apple_search_ads__organization_report_date_day.sql", "original_file_path": "models/apple_search_ads.yml", "name": "not_null_apple_search_ads__organization_report_date_day", "alias": "not_null_apple_search_ads__organization_report_date_day", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["apple_search_ads__organization_report"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads/models/apple_search_ads.yml/not_null_apple_search_ads__organization_report_date_day.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1661548509.075489, "compiled_sql": "\n \n \n\nselect *\nfrom \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads\".\"apple_search_ads__organization_report\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "date_day", "file_key_name": "models.apple_search_ads__organization_report"}, "test.apple_search_ads.dbt_utils_unique_combination_of_columns_apple_search_ads__organization_report_organization_id__date_day.8bc84fccc3": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_f2f453668a8bb7c0387ed85fc7bfaf2d\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["organization_id", "date_day"], "model": "{{ get_where_subquery(ref('apple_search_ads__organization_report')) }}"}, "namespace": "dbt_utils"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_utils.test_unique_combination_of_columns", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads.apple_search_ads__organization_report"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_f2f453668a8bb7c0387ed85fc7bfaf2d", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "postgres", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads", "dbt_utils_unique_combination_of_columns_apple_search_ads__organization_report_organization_id__date_day"], "unique_id": "test.apple_search_ads.dbt_utils_unique_combination_of_columns_apple_search_ads__organization_report_organization_id__date_day.8bc84fccc3", "package_name": "apple_search_ads", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads", "path": "dbt_utils_unique_combination_o_f2f453668a8bb7c0387ed85fc7bfaf2d.sql", "original_file_path": "models/apple_search_ads.yml", "name": "dbt_utils_unique_combination_of_columns_apple_search_ads__organization_report_organization_id__date_day", "alias": "dbt_utils_unique_combination_o_f2f453668a8bb7c0387ed85fc7bfaf2d", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["apple_search_ads__organization_report"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads/models/apple_search_ads.yml/dbt_utils_unique_combination_o_f2f453668a8bb7c0387ed85fc7bfaf2d.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_f2f453668a8bb7c0387ed85fc7bfaf2d"}, "created_at": 1661548509.0766551, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n organization_id, date_day\n from \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads\".\"apple_search_ads__organization_report\"\n group by organization_id, date_day\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": null, "file_key_name": "models.apple_search_ads__organization_report"}, "test.apple_search_ads.not_null_apple_search_ads__search_term_report_date_day.1bc3b0d57c": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('apple_search_ads__search_term_report')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads.apple_search_ads__search_term_report"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "postgres", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads", "not_null_apple_search_ads__search_term_report_date_day"], "unique_id": "test.apple_search_ads.not_null_apple_search_ads__search_term_report_date_day.1bc3b0d57c", "package_name": "apple_search_ads", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads", "path": "not_null_apple_search_ads__search_term_report_date_day.sql", "original_file_path": "models/apple_search_ads.yml", "name": "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": ""}, "tags": [], "refs": [["apple_search_ads__search_term_report"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads/models/apple_search_ads.yml/not_null_apple_search_ads__search_term_report_date_day.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1661548509.079436, "compiled_sql": "\n \n \n\nselect *\nfrom \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads\".\"apple_search_ads__search_term_report\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "date_day", "file_key_name": "models.apple_search_ads__search_term_report"}, "test.apple_search_ads.not_null_apple_search_ads__search_term_report_search_term_text.aecc7447f7": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "search_term_text", "model": "{{ get_where_subquery(ref('apple_search_ads__search_term_report')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads.apple_search_ads__search_term_report"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "postgres", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads", "not_null_apple_search_ads__search_term_report_search_term_text"], "unique_id": "test.apple_search_ads.not_null_apple_search_ads__search_term_report_search_term_text.aecc7447f7", "package_name": "apple_search_ads", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads", "path": "not_null_apple_search_ads__search_term_report_search_term_text.sql", "original_file_path": "models/apple_search_ads.yml", "name": "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": ""}, "tags": [], "refs": [["apple_search_ads__search_term_report"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads/models/apple_search_ads.yml/not_null_apple_search_ads__search_term_report_search_term_text.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1661548509.080598, "compiled_sql": "\n \n \n\nselect *\nfrom \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads\".\"apple_search_ads__search_term_report\"\nwhere search_term_text is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "search_term_text", "file_key_name": "models.apple_search_ads__search_term_report"}, "test.apple_search_ads.dbt_utils_unique_combination_of_columns_apple_search_ads__search_term_report_search_term_text__date_day.e60fe79ec4": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_7c3690db5ce751fbf1f2dff07b3a8690\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["search_term_text", "date_day"], "model": "{{ get_where_subquery(ref('apple_search_ads__search_term_report')) }}"}, "namespace": "dbt_utils"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_utils.test_unique_combination_of_columns", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads.apple_search_ads__search_term_report"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_7c3690db5ce751fbf1f2dff07b3a8690", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "postgres", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads", "dbt_utils_unique_combination_of_columns_apple_search_ads__search_term_report_search_term_text__date_day"], "unique_id": "test.apple_search_ads.dbt_utils_unique_combination_of_columns_apple_search_ads__search_term_report_search_term_text__date_day.e60fe79ec4", "package_name": "apple_search_ads", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads", "path": "dbt_utils_unique_combination_o_7c3690db5ce751fbf1f2dff07b3a8690.sql", "original_file_path": "models/apple_search_ads.yml", "name": "dbt_utils_unique_combination_of_columns_apple_search_ads__search_term_report_search_term_text__date_day", "alias": "dbt_utils_unique_combination_o_7c3690db5ce751fbf1f2dff07b3a8690", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["apple_search_ads__search_term_report"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads/models/apple_search_ads.yml/dbt_utils_unique_combination_o_7c3690db5ce751fbf1f2dff07b3a8690.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_7c3690db5ce751fbf1f2dff07b3a8690"}, "created_at": 1661548509.081747, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n search_term_text, date_day\n from \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads\".\"apple_search_ads__search_term_report\"\n group by search_term_text, date_day\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": null, "file_key_name": "models.apple_search_ads__search_term_report"}, "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_group_history_modified_at.e5d65fa28f": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "modified_at", "model": "{{ get_where_subquery(ref('stg_apple_search_ads__ad_group_history')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__ad_group_history"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "postgres", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads_source", "not_null_stg_apple_search_ads__ad_group_history_modified_at"], "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_group_history_modified_at.e5d65fa28f", "package_name": "apple_search_ads_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "not_null_stg_apple_search_ads__ad_group_history_modified_at.sql", "original_file_path": "models/stg_apple_search_ads.yml", "name": "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": ""}, "tags": [], "refs": [["stg_apple_search_ads__ad_group_history"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads.yml/not_null_stg_apple_search_ads__ad_group_history_modified_at.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1661548509.127038, "compiled_sql": "\n \n \n\nselect *\nfrom \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__ad_group_history\"\nwhere modified_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "modified_at", "file_key_name": "models.stg_apple_search_ads__ad_group_history"}, "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_group_history_ad_group_id.dc128eecb7": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "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}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__ad_group_history"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "postgres", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads_source", "not_null_stg_apple_search_ads__ad_group_history_ad_group_id"], "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_group_history_ad_group_id.dc128eecb7", "package_name": "apple_search_ads_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "not_null_stg_apple_search_ads__ad_group_history_ad_group_id.sql", "original_file_path": "models/stg_apple_search_ads.yml", "name": "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": ""}, "tags": [], "refs": [["stg_apple_search_ads__ad_group_history"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads.yml/not_null_stg_apple_search_ads__ad_group_history_ad_group_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1661548509.1282089, "compiled_sql": "\n \n \n\nselect *\nfrom \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__ad_group_history\"\nwhere ad_group_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "ad_group_id", "file_key_name": "models.stg_apple_search_ads__ad_group_history"}, "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__ad_group_history_ad_group_id__modified_at.84af14c83b": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_d82553a0f3b4daa8d59460c85a542d4f\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["ad_group_id", "modified_at"], "model": "{{ get_where_subquery(ref('stg_apple_search_ads__ad_group_history')) }}"}, "namespace": "dbt_utils"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_utils.test_unique_combination_of_columns", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__ad_group_history"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_d82553a0f3b4daa8d59460c85a542d4f", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "postgres", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads_source", "dbt_utils_unique_combination_of_columns_stg_apple_search_ads__ad_group_history_ad_group_id__modified_at"], "unique_id": "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__ad_group_history_ad_group_id__modified_at.84af14c83b", "package_name": "apple_search_ads_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "dbt_utils_unique_combination_o_d82553a0f3b4daa8d59460c85a542d4f.sql", "original_file_path": "models/stg_apple_search_ads.yml", "name": "dbt_utils_unique_combination_of_columns_stg_apple_search_ads__ad_group_history_ad_group_id__modified_at", "alias": "dbt_utils_unique_combination_o_d82553a0f3b4daa8d59460c85a542d4f", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_apple_search_ads__ad_group_history"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads.yml/dbt_utils_unique_combination_o_d82553a0f3b4daa8d59460c85a542d4f.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_d82553a0f3b4daa8d59460c85a542d4f"}, "created_at": 1661548509.129434, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n ad_group_id, modified_at\n from \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__ad_group_history\"\n group by ad_group_id, modified_at\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": null, "file_key_name": "models.stg_apple_search_ads__ad_group_history"}, "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_group_report_ad_group_id.a115f9cfc1": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "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}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__ad_group_report"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "postgres", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads_source", "not_null_stg_apple_search_ads__ad_group_report_ad_group_id"], "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_group_report_ad_group_id.a115f9cfc1", "package_name": "apple_search_ads_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "not_null_stg_apple_search_ads__ad_group_report_ad_group_id.sql", "original_file_path": "models/stg_apple_search_ads.yml", "name": "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": ""}, "tags": [], "refs": [["stg_apple_search_ads__ad_group_report"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads.yml/not_null_stg_apple_search_ads__ad_group_report_ad_group_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1661548509.132571, "compiled_sql": "\n \n \n\nselect *\nfrom \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__ad_group_report\"\nwhere ad_group_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "ad_group_id", "file_key_name": "models.stg_apple_search_ads__ad_group_report"}, "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_group_report_date_day.4dfd46a43b": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('stg_apple_search_ads__ad_group_report')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__ad_group_report"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "postgres", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads_source", "not_null_stg_apple_search_ads__ad_group_report_date_day"], "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_group_report_date_day.4dfd46a43b", "package_name": "apple_search_ads_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "not_null_stg_apple_search_ads__ad_group_report_date_day.sql", "original_file_path": "models/stg_apple_search_ads.yml", "name": "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": ""}, "tags": [], "refs": [["stg_apple_search_ads__ad_group_report"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads.yml/not_null_stg_apple_search_ads__ad_group_report_date_day.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1661548509.1335402, "compiled_sql": "\n \n \n\nselect *\nfrom \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__ad_group_report\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "date_day", "file_key_name": "models.stg_apple_search_ads__ad_group_report"}, "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__ad_group_report_ad_group_id__date_day.a0fcc4e33c": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_107a9492c163887581fde6b34131e42d\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["ad_group_id", "date_day"], "model": "{{ get_where_subquery(ref('stg_apple_search_ads__ad_group_report')) }}"}, "namespace": "dbt_utils"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_utils.test_unique_combination_of_columns", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__ad_group_report"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_107a9492c163887581fde6b34131e42d", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "postgres", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads_source", "dbt_utils_unique_combination_of_columns_stg_apple_search_ads__ad_group_report_ad_group_id__date_day"], "unique_id": "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__ad_group_report_ad_group_id__date_day.a0fcc4e33c", "package_name": "apple_search_ads_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "dbt_utils_unique_combination_o_107a9492c163887581fde6b34131e42d.sql", "original_file_path": "models/stg_apple_search_ads.yml", "name": "dbt_utils_unique_combination_of_columns_stg_apple_search_ads__ad_group_report_ad_group_id__date_day", "alias": "dbt_utils_unique_combination_o_107a9492c163887581fde6b34131e42d", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_apple_search_ads__ad_group_report"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads.yml/dbt_utils_unique_combination_o_107a9492c163887581fde6b34131e42d.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_107a9492c163887581fde6b34131e42d"}, "created_at": 1661548509.134491, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n ad_group_id, date_day\n from \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__ad_group_report\"\n group by ad_group_id, date_day\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": null, "file_key_name": "models.stg_apple_search_ads__ad_group_report"}, "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_history_modified_at.2eea7e006d": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "modified_at", "model": "{{ get_where_subquery(ref('stg_apple_search_ads__ad_history')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__ad_history"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "postgres", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads_source", "not_null_stg_apple_search_ads__ad_history_modified_at"], "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_history_modified_at.2eea7e006d", "package_name": "apple_search_ads_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "not_null_stg_apple_search_ads__ad_history_modified_at.sql", "original_file_path": "models/stg_apple_search_ads.yml", "name": "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": ""}, "tags": [], "refs": [["stg_apple_search_ads__ad_history"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads.yml/not_null_stg_apple_search_ads__ad_history_modified_at.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1661548509.1372008, "compiled_sql": "\n \n \n\nselect *\nfrom \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__ad_history\"\nwhere modified_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "modified_at", "file_key_name": "models.stg_apple_search_ads__ad_history"}, "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_history_ad_id.4ad3bde32a": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "ad_id", "model": "{{ get_where_subquery(ref('stg_apple_search_ads__ad_history')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__ad_history"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "postgres", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads_source", "not_null_stg_apple_search_ads__ad_history_ad_id"], "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_history_ad_id.4ad3bde32a", "package_name": "apple_search_ads_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "not_null_stg_apple_search_ads__ad_history_ad_id.sql", "original_file_path": "models/stg_apple_search_ads.yml", "name": "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": ""}, "tags": [], "refs": [["stg_apple_search_ads__ad_history"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads.yml/not_null_stg_apple_search_ads__ad_history_ad_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1661548509.1382048, "compiled_sql": "\n \n \n\nselect *\nfrom \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__ad_history\"\nwhere ad_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "ad_id", "file_key_name": "models.stg_apple_search_ads__ad_history"}, "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__ad_history_ad_id__modified_at.38599b8cba": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_ed0f61b146739c836defcf2fb6005d31\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["ad_id", "modified_at"], "model": "{{ get_where_subquery(ref('stg_apple_search_ads__ad_history')) }}"}, "namespace": "dbt_utils"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_utils.test_unique_combination_of_columns", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__ad_history"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_ed0f61b146739c836defcf2fb6005d31", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "postgres", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads_source", "dbt_utils_unique_combination_of_columns_stg_apple_search_ads__ad_history_ad_id__modified_at"], "unique_id": "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__ad_history_ad_id__modified_at.38599b8cba", "package_name": "apple_search_ads_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "dbt_utils_unique_combination_o_ed0f61b146739c836defcf2fb6005d31.sql", "original_file_path": "models/stg_apple_search_ads.yml", "name": "dbt_utils_unique_combination_of_columns_stg_apple_search_ads__ad_history_ad_id__modified_at", "alias": "dbt_utils_unique_combination_o_ed0f61b146739c836defcf2fb6005d31", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_apple_search_ads__ad_history"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads.yml/dbt_utils_unique_combination_o_ed0f61b146739c836defcf2fb6005d31.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_ed0f61b146739c836defcf2fb6005d31"}, "created_at": 1661548509.1392992, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n ad_id, modified_at\n from \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__ad_history\"\n group by ad_id, modified_at\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": null, "file_key_name": "models.stg_apple_search_ads__ad_history"}, "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_report_date_day.e6252346d8": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('stg_apple_search_ads__ad_report')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__ad_report"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "postgres", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads_source", "not_null_stg_apple_search_ads__ad_report_date_day"], "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_report_date_day.e6252346d8", "package_name": "apple_search_ads_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "not_null_stg_apple_search_ads__ad_report_date_day.sql", "original_file_path": "models/stg_apple_search_ads.yml", "name": "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": ""}, "tags": [], "refs": [["stg_apple_search_ads__ad_report"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads.yml/not_null_stg_apple_search_ads__ad_report_date_day.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1661548509.141841, "compiled_sql": "\n \n \n\nselect *\nfrom \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__ad_report\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "date_day", "file_key_name": "models.stg_apple_search_ads__ad_report"}, "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_report_ad_group_id.a397755e9f": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "ad_group_id", "model": "{{ get_where_subquery(ref('stg_apple_search_ads__ad_report')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__ad_report"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "postgres", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads_source", "not_null_stg_apple_search_ads__ad_report_ad_group_id"], "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_report_ad_group_id.a397755e9f", "package_name": "apple_search_ads_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "not_null_stg_apple_search_ads__ad_report_ad_group_id.sql", "original_file_path": "models/stg_apple_search_ads.yml", "name": "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": ""}, "tags": [], "refs": [["stg_apple_search_ads__ad_report"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads.yml/not_null_stg_apple_search_ads__ad_report_ad_group_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1661548509.1431859, "compiled_sql": "\n \n \n\nselect *\nfrom \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__ad_report\"\nwhere ad_group_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "ad_group_id", "file_key_name": "models.stg_apple_search_ads__ad_report"}, "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_report_ad_id.d08e760c58": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "ad_id", "model": "{{ get_where_subquery(ref('stg_apple_search_ads__ad_report')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__ad_report"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "postgres", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads_source", "not_null_stg_apple_search_ads__ad_report_ad_id"], "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_report_ad_id.d08e760c58", "package_name": "apple_search_ads_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "not_null_stg_apple_search_ads__ad_report_ad_id.sql", "original_file_path": "models/stg_apple_search_ads.yml", "name": "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": ""}, "tags": [], "refs": [["stg_apple_search_ads__ad_report"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads.yml/not_null_stg_apple_search_ads__ad_report_ad_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1661548509.1441228, "compiled_sql": "\n \n \n\nselect *\nfrom \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__ad_report\"\nwhere ad_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "ad_id", "file_key_name": "models.stg_apple_search_ads__ad_report"}, "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__ad_report_ad_id__date_day__ad_group_id.0d8d23c516": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_9ce5e828ce9fa0987b5e86cbcb1207b9\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["ad_id", "date_day", "ad_group_id"], "model": "{{ get_where_subquery(ref('stg_apple_search_ads__ad_report')) }}"}, "namespace": "dbt_utils"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_utils.test_unique_combination_of_columns", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__ad_report"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_9ce5e828ce9fa0987b5e86cbcb1207b9", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "postgres", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads_source", "dbt_utils_unique_combination_of_columns_stg_apple_search_ads__ad_report_ad_id__date_day__ad_group_id"], "unique_id": "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__ad_report_ad_id__date_day__ad_group_id.0d8d23c516", "package_name": "apple_search_ads_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "dbt_utils_unique_combination_o_9ce5e828ce9fa0987b5e86cbcb1207b9.sql", "original_file_path": "models/stg_apple_search_ads.yml", "name": "dbt_utils_unique_combination_of_columns_stg_apple_search_ads__ad_report_ad_id__date_day__ad_group_id", "alias": "dbt_utils_unique_combination_o_9ce5e828ce9fa0987b5e86cbcb1207b9", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_apple_search_ads__ad_report"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads.yml/dbt_utils_unique_combination_o_9ce5e828ce9fa0987b5e86cbcb1207b9.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_9ce5e828ce9fa0987b5e86cbcb1207b9"}, "created_at": 1661548509.145057, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n ad_id, date_day, ad_group_id\n from \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__ad_report\"\n group by ad_id, date_day, ad_group_id\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": null, "file_key_name": "models.stg_apple_search_ads__ad_report"}, "test.apple_search_ads_source.not_null_stg_apple_search_ads__campaign_history_modified_at.f34a7a97c9": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "modified_at", "model": "{{ get_where_subquery(ref('stg_apple_search_ads__campaign_history')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__campaign_history"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "postgres", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads_source", "not_null_stg_apple_search_ads__campaign_history_modified_at"], "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__campaign_history_modified_at.f34a7a97c9", "package_name": "apple_search_ads_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "not_null_stg_apple_search_ads__campaign_history_modified_at.sql", "original_file_path": "models/stg_apple_search_ads.yml", "name": "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": ""}, "tags": [], "refs": [["stg_apple_search_ads__campaign_history"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads.yml/not_null_stg_apple_search_ads__campaign_history_modified_at.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1661548509.147777, "compiled_sql": "\n \n \n\nselect *\nfrom \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__campaign_history\"\nwhere modified_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "modified_at", "file_key_name": "models.stg_apple_search_ads__campaign_history"}, "test.apple_search_ads_source.not_null_stg_apple_search_ads__campaign_history_campaign_id.3f0f7502b8": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "campaign_id", "model": "{{ get_where_subquery(ref('stg_apple_search_ads__campaign_history')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__campaign_history"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "postgres", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads_source", "not_null_stg_apple_search_ads__campaign_history_campaign_id"], "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__campaign_history_campaign_id.3f0f7502b8", "package_name": "apple_search_ads_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "not_null_stg_apple_search_ads__campaign_history_campaign_id.sql", "original_file_path": "models/stg_apple_search_ads.yml", "name": "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": ""}, "tags": [], "refs": [["stg_apple_search_ads__campaign_history"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads.yml/not_null_stg_apple_search_ads__campaign_history_campaign_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1661548509.1489012, "compiled_sql": "\n \n \n\nselect *\nfrom \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__campaign_history\"\nwhere campaign_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "campaign_id", "file_key_name": "models.stg_apple_search_ads__campaign_history"}, "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__campaign_history_campaign_id__modified_at.317f970af9": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_055fa7e8a6c292e0f56d1feec61284a9\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["campaign_id", "modified_at"], "model": "{{ get_where_subquery(ref('stg_apple_search_ads__campaign_history')) }}"}, "namespace": "dbt_utils"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_utils.test_unique_combination_of_columns", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__campaign_history"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_055fa7e8a6c292e0f56d1feec61284a9", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "postgres", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads_source", "dbt_utils_unique_combination_of_columns_stg_apple_search_ads__campaign_history_campaign_id__modified_at"], "unique_id": "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__campaign_history_campaign_id__modified_at.317f970af9", "package_name": "apple_search_ads_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "dbt_utils_unique_combination_o_055fa7e8a6c292e0f56d1feec61284a9.sql", "original_file_path": "models/stg_apple_search_ads.yml", "name": "dbt_utils_unique_combination_of_columns_stg_apple_search_ads__campaign_history_campaign_id__modified_at", "alias": "dbt_utils_unique_combination_o_055fa7e8a6c292e0f56d1feec61284a9", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_apple_search_ads__campaign_history"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads.yml/dbt_utils_unique_combination_o_055fa7e8a6c292e0f56d1feec61284a9.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_055fa7e8a6c292e0f56d1feec61284a9"}, "created_at": 1661548509.1499038, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n campaign_id, modified_at\n from \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__campaign_history\"\n group by campaign_id, modified_at\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": null, "file_key_name": "models.stg_apple_search_ads__campaign_history"}, "test.apple_search_ads_source.not_null_stg_apple_search_ads__campaign_report_campaign_id.b83941e728": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "campaign_id", "model": "{{ get_where_subquery(ref('stg_apple_search_ads__campaign_report')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__campaign_report"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "postgres", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads_source", "not_null_stg_apple_search_ads__campaign_report_campaign_id"], "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__campaign_report_campaign_id.b83941e728", "package_name": "apple_search_ads_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "not_null_stg_apple_search_ads__campaign_report_campaign_id.sql", "original_file_path": "models/stg_apple_search_ads.yml", "name": "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": ""}, "tags": [], "refs": [["stg_apple_search_ads__campaign_report"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads.yml/not_null_stg_apple_search_ads__campaign_report_campaign_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1661548509.152701, "compiled_sql": "\n \n \n\nselect *\nfrom \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__campaign_report\"\nwhere campaign_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "campaign_id", "file_key_name": "models.stg_apple_search_ads__campaign_report"}, "test.apple_search_ads_source.not_null_stg_apple_search_ads__campaign_report_date_day.c8dc10a6f3": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('stg_apple_search_ads__campaign_report')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__campaign_report"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "postgres", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads_source", "not_null_stg_apple_search_ads__campaign_report_date_day"], "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__campaign_report_date_day.c8dc10a6f3", "package_name": "apple_search_ads_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "not_null_stg_apple_search_ads__campaign_report_date_day.sql", "original_file_path": "models/stg_apple_search_ads.yml", "name": "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": ""}, "tags": [], "refs": [["stg_apple_search_ads__campaign_report"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads.yml/not_null_stg_apple_search_ads__campaign_report_date_day.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1661548509.153816, "compiled_sql": "\n \n \n\nselect *\nfrom \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__campaign_report\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "date_day", "file_key_name": "models.stg_apple_search_ads__campaign_report"}, "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__campaign_report_campaign_id__date_day.bad41b0481": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_d8bdb244aa45cb237ef5189371733c07\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["campaign_id", "date_day"], "model": "{{ get_where_subquery(ref('stg_apple_search_ads__campaign_report')) }}"}, "namespace": "dbt_utils"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_utils.test_unique_combination_of_columns", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__campaign_report"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_d8bdb244aa45cb237ef5189371733c07", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "postgres", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads_source", "dbt_utils_unique_combination_of_columns_stg_apple_search_ads__campaign_report_campaign_id__date_day"], "unique_id": "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__campaign_report_campaign_id__date_day.bad41b0481", "package_name": "apple_search_ads_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "dbt_utils_unique_combination_o_d8bdb244aa45cb237ef5189371733c07.sql", "original_file_path": "models/stg_apple_search_ads.yml", "name": "dbt_utils_unique_combination_of_columns_stg_apple_search_ads__campaign_report_campaign_id__date_day", "alias": "dbt_utils_unique_combination_o_d8bdb244aa45cb237ef5189371733c07", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_apple_search_ads__campaign_report"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads.yml/dbt_utils_unique_combination_o_d8bdb244aa45cb237ef5189371733c07.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_d8bdb244aa45cb237ef5189371733c07"}, "created_at": 1661548509.1548228, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n campaign_id, date_day\n from \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__campaign_report\"\n group by campaign_id, date_day\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": null, "file_key_name": "models.stg_apple_search_ads__campaign_report"}, "test.apple_search_ads_source.not_null_stg_apple_search_ads__keyword_history_modified_at.42fde5a287": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "modified_at", "model": "{{ get_where_subquery(ref('stg_apple_search_ads__keyword_history')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__keyword_history"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "postgres", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads_source", "not_null_stg_apple_search_ads__keyword_history_modified_at"], "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__keyword_history_modified_at.42fde5a287", "package_name": "apple_search_ads_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "not_null_stg_apple_search_ads__keyword_history_modified_at.sql", "original_file_path": "models/stg_apple_search_ads.yml", "name": "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": ""}, "tags": [], "refs": [["stg_apple_search_ads__keyword_history"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads.yml/not_null_stg_apple_search_ads__keyword_history_modified_at.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1661548509.157724, "compiled_sql": "\n \n \n\nselect *\nfrom \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__keyword_history\"\nwhere modified_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "modified_at", "file_key_name": "models.stg_apple_search_ads__keyword_history"}, "test.apple_search_ads_source.not_null_stg_apple_search_ads__keyword_history_keyword_id.889f83cfd2": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "keyword_id", "model": "{{ get_where_subquery(ref('stg_apple_search_ads__keyword_history')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__keyword_history"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "postgres", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads_source", "not_null_stg_apple_search_ads__keyword_history_keyword_id"], "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__keyword_history_keyword_id.889f83cfd2", "package_name": "apple_search_ads_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "not_null_stg_apple_search_ads__keyword_history_keyword_id.sql", "original_file_path": "models/stg_apple_search_ads.yml", "name": "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": ""}, "tags": [], "refs": [["stg_apple_search_ads__keyword_history"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads.yml/not_null_stg_apple_search_ads__keyword_history_keyword_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1661548509.158676, "compiled_sql": "\n \n \n\nselect *\nfrom \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__keyword_history\"\nwhere keyword_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "keyword_id", "file_key_name": "models.stg_apple_search_ads__keyword_history"}, "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__keyword_history_keyword_id__modified_at.7b06162d24": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_26b09b2f81a50b0ba84b566cd7df85b5\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["keyword_id", "modified_at"], "model": "{{ get_where_subquery(ref('stg_apple_search_ads__keyword_history')) }}"}, "namespace": "dbt_utils"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_utils.test_unique_combination_of_columns", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__keyword_history"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_26b09b2f81a50b0ba84b566cd7df85b5", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "postgres", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads_source", "dbt_utils_unique_combination_of_columns_stg_apple_search_ads__keyword_history_keyword_id__modified_at"], "unique_id": "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__keyword_history_keyword_id__modified_at.7b06162d24", "package_name": "apple_search_ads_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "dbt_utils_unique_combination_o_26b09b2f81a50b0ba84b566cd7df85b5.sql", "original_file_path": "models/stg_apple_search_ads.yml", "name": "dbt_utils_unique_combination_of_columns_stg_apple_search_ads__keyword_history_keyword_id__modified_at", "alias": "dbt_utils_unique_combination_o_26b09b2f81a50b0ba84b566cd7df85b5", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_apple_search_ads__keyword_history"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads.yml/dbt_utils_unique_combination_o_26b09b2f81a50b0ba84b566cd7df85b5.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_26b09b2f81a50b0ba84b566cd7df85b5"}, "created_at": 1661548509.15977, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n keyword_id, modified_at\n from \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__keyword_history\"\n group by keyword_id, modified_at\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": null, "file_key_name": "models.stg_apple_search_ads__keyword_history"}, "test.apple_search_ads_source.not_null_stg_apple_search_ads__keyword_report_keyword_id.501725b09e": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "keyword_id", "model": "{{ get_where_subquery(ref('stg_apple_search_ads__keyword_report')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__keyword_report"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "postgres", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads_source", "not_null_stg_apple_search_ads__keyword_report_keyword_id"], "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__keyword_report_keyword_id.501725b09e", "package_name": "apple_search_ads_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "not_null_stg_apple_search_ads__keyword_report_keyword_id.sql", "original_file_path": "models/stg_apple_search_ads.yml", "name": "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": ""}, "tags": [], "refs": [["stg_apple_search_ads__keyword_report"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads.yml/not_null_stg_apple_search_ads__keyword_report_keyword_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1661548509.162518, "compiled_sql": "\n \n \n\nselect *\nfrom \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__keyword_report\"\nwhere keyword_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "keyword_id", "file_key_name": "models.stg_apple_search_ads__keyword_report"}, "test.apple_search_ads_source.not_null_stg_apple_search_ads__keyword_report_date_day.16098db928": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('stg_apple_search_ads__keyword_report')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__keyword_report"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "postgres", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads_source", "not_null_stg_apple_search_ads__keyword_report_date_day"], "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__keyword_report_date_day.16098db928", "package_name": "apple_search_ads_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "not_null_stg_apple_search_ads__keyword_report_date_day.sql", "original_file_path": "models/stg_apple_search_ads.yml", "name": "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": ""}, "tags": [], "refs": [["stg_apple_search_ads__keyword_report"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads.yml/not_null_stg_apple_search_ads__keyword_report_date_day.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1661548509.1634848, "compiled_sql": "\n \n \n\nselect *\nfrom \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__keyword_report\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "date_day", "file_key_name": "models.stg_apple_search_ads__keyword_report"}, "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__keyword_report_keyword_id__date_day.9f0099cff8": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_2ec7f68205f05a3b68cfa7324135a1a5\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["keyword_id", "date_day"], "model": "{{ get_where_subquery(ref('stg_apple_search_ads__keyword_report')) }}"}, "namespace": "dbt_utils"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_utils.test_unique_combination_of_columns", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__keyword_report"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_2ec7f68205f05a3b68cfa7324135a1a5", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "postgres", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads_source", "dbt_utils_unique_combination_of_columns_stg_apple_search_ads__keyword_report_keyword_id__date_day"], "unique_id": "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__keyword_report_keyword_id__date_day.9f0099cff8", "package_name": "apple_search_ads_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "dbt_utils_unique_combination_o_2ec7f68205f05a3b68cfa7324135a1a5.sql", "original_file_path": "models/stg_apple_search_ads.yml", "name": "dbt_utils_unique_combination_of_columns_stg_apple_search_ads__keyword_report_keyword_id__date_day", "alias": "dbt_utils_unique_combination_o_2ec7f68205f05a3b68cfa7324135a1a5", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_apple_search_ads__keyword_report"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads.yml/dbt_utils_unique_combination_o_2ec7f68205f05a3b68cfa7324135a1a5.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_2ec7f68205f05a3b68cfa7324135a1a5"}, "created_at": 1661548509.1644669, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n keyword_id, date_day\n from \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__keyword_report\"\n group by keyword_id, date_day\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": null, "file_key_name": "models.stg_apple_search_ads__keyword_report"}, "test.apple_search_ads_source.not_null_stg_apple_search_ads__organization_organization_id.b013ce33cb": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "organization_id", "model": "{{ get_where_subquery(ref('stg_apple_search_ads__organization')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__organization"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "postgres", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads_source", "not_null_stg_apple_search_ads__organization_organization_id"], "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__organization_organization_id.b013ce33cb", "package_name": "apple_search_ads_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "not_null_stg_apple_search_ads__organization_organization_id.sql", "original_file_path": "models/stg_apple_search_ads.yml", "name": "not_null_stg_apple_search_ads__organization_organization_id", "alias": "not_null_stg_apple_search_ads__organization_organization_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_apple_search_ads__organization"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads.yml/not_null_stg_apple_search_ads__organization_organization_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1661548509.167095, "compiled_sql": "\n \n \n\nselect *\nfrom \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__organization\"\nwhere organization_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "organization_id", "file_key_name": "models.stg_apple_search_ads__organization"}, "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__organization_organization_id.8647048f7a": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_53ded9060f9d3981217ae23e5d2ba89b\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["organization_id"], "model": "{{ get_where_subquery(ref('stg_apple_search_ads__organization')) }}"}, "namespace": "dbt_utils"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_utils.test_unique_combination_of_columns", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__organization"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_53ded9060f9d3981217ae23e5d2ba89b", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "postgres", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads_source", "dbt_utils_unique_combination_of_columns_stg_apple_search_ads__organization_organization_id"], "unique_id": "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__organization_organization_id.8647048f7a", "package_name": "apple_search_ads_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "dbt_utils_unique_combination_o_53ded9060f9d3981217ae23e5d2ba89b.sql", "original_file_path": "models/stg_apple_search_ads.yml", "name": "dbt_utils_unique_combination_of_columns_stg_apple_search_ads__organization_organization_id", "alias": "dbt_utils_unique_combination_o_53ded9060f9d3981217ae23e5d2ba89b", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_apple_search_ads__organization"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads.yml/dbt_utils_unique_combination_o_53ded9060f9d3981217ae23e5d2ba89b.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_53ded9060f9d3981217ae23e5d2ba89b"}, "created_at": 1661548509.168042, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n organization_id\n from \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__organization\"\n group by organization_id\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": null, "file_key_name": "models.stg_apple_search_ads__organization"}, "test.apple_search_ads_source.not_null_stg_apple_search_ads__search_term_report__fivetran_id.aa430d1dad": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "_fivetran_id", "model": "{{ get_where_subquery(ref('stg_apple_search_ads__search_term_report')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__search_term_report"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "postgres", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads_source", "not_null_stg_apple_search_ads__search_term_report__fivetran_id"], "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__search_term_report__fivetran_id.aa430d1dad", "package_name": "apple_search_ads_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "not_null_stg_apple_search_ads__search_term_report__fivetran_id.sql", "original_file_path": "models/stg_apple_search_ads.yml", "name": "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": ""}, "tags": [], "refs": [["stg_apple_search_ads__search_term_report"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads.yml/not_null_stg_apple_search_ads__search_term_report__fivetran_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1661548509.170557, "compiled_sql": "\n \n \n\nselect *\nfrom \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__search_term_report\"\nwhere _fivetran_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "_fivetran_id", "file_key_name": "models.stg_apple_search_ads__search_term_report"}, "test.apple_search_ads_source.not_null_stg_apple_search_ads__search_term_report_date_day.fd93df3302": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('stg_apple_search_ads__search_term_report')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__search_term_report"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "postgres", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads_source", "not_null_stg_apple_search_ads__search_term_report_date_day"], "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__search_term_report_date_day.fd93df3302", "package_name": "apple_search_ads_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "not_null_stg_apple_search_ads__search_term_report_date_day.sql", "original_file_path": "models/stg_apple_search_ads.yml", "name": "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": ""}, "tags": [], "refs": [["stg_apple_search_ads__search_term_report"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads.yml/not_null_stg_apple_search_ads__search_term_report_date_day.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1661548509.171555, "compiled_sql": "\n \n \n\nselect *\nfrom \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__search_term_report\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "date_day", "file_key_name": "models.stg_apple_search_ads__search_term_report"}, "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__search_term_report__fivetran_id__date_day.aad2a48344": {"raw_sql": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_4b957c6b8a75dcd1a6055884f71d71c1\") }}", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["_fivetran_id", "date_day"], "model": "{{ get_where_subquery(ref('stg_apple_search_ads__search_term_report')) }}"}, "namespace": "dbt_utils"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_utils.test_unique_combination_of_columns", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__search_term_report"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_4b957c6b8a75dcd1a6055884f71d71c1", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "postgres", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads_source", "dbt_utils_unique_combination_of_columns_stg_apple_search_ads__search_term_report__fivetran_id__date_day"], "unique_id": "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__search_term_report__fivetran_id__date_day.aad2a48344", "package_name": "apple_search_ads_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "dbt_utils_unique_combination_o_4b957c6b8a75dcd1a6055884f71d71c1.sql", "original_file_path": "models/stg_apple_search_ads.yml", "name": "dbt_utils_unique_combination_of_columns_stg_apple_search_ads__search_term_report__fivetran_id__date_day", "alias": "dbt_utils_unique_combination_o_4b957c6b8a75dcd1a6055884f71d71c1", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_apple_search_ads__search_term_report"]], "sources": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads.yml/dbt_utils_unique_combination_o_4b957c6b8a75dcd1a6055884f71d71c1.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_4b957c6b8a75dcd1a6055884f71d71c1"}, "created_at": 1661548509.172677, "compiled_sql": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n _fivetran_id, date_day\n from \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__search_term_report\"\n group by _fivetran_id, date_day\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": null, "file_key_name": "models.stg_apple_search_ads__search_term_report"}}, "sources": {"source.apple_search_ads_source.apple_search_ads.ad_group_history": {"fqn": ["apple_search_ads_source", "apple_search_ads", "ad_group_history"], "database": "postgres", "schema": "apple_search_ads_integration_tests", "unique_id": "source.apple_search_ads_source.apple_search_ads.ad_group_history", "package_name": "apple_search_ads_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "models/src_apple_search_ads.yml", "original_file_path": "models/src_apple_search_ads.yml", "name": "ad_group_history", "source_name": "apple_search_ads", "source_description": "", "loader": "Fivetran", "identifier": "ad_group_history_data", "resource_type": "source", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "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, "quote": null, "tags": []}, "id": {"name": "id", "description": "Ad group ID associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_id": {"name": "campaign_id", "description": "Campaign ID associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "start_time": {"name": "start_time", "description": "Timestamp of designated ad group start time.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "end_time": {"name": "end_time", "description": "The designated ad group end time.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "name": {"name": "name", "description": "Ad group name.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "organization_id": {"name": "organization_id", "description": "Organization ID associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "status": {"name": "status", "description": "The current status of the ad group, values include ENABLED and PAUSED.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "\"postgres\".\"apple_search_ads_integration_tests\".\"ad_group_history_data\"", "created_at": 1661548509.1749508}, "source.apple_search_ads_source.apple_search_ads.ad_group_report": {"fqn": ["apple_search_ads_source", "apple_search_ads", "ad_group_report"], "database": "postgres", "schema": "apple_search_ads_integration_tests", "unique_id": "source.apple_search_ads_source.apple_search_ads.ad_group_report", "package_name": "apple_search_ads_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "models/src_apple_search_ads.yml", "original_file_path": "models/src_apple_search_ads.yml", "name": "ad_group_report", "source_name": "apple_search_ads", "source_description": "", "loader": "Fivetran", "identifier": "ad_group_report_data", "resource_type": "source", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "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, "quote": null, "tags": []}, "date": {"name": "date", "description": "Date for daily report aggregation.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "impressions": {"name": "impressions", "description": "Number of times your ad appeared in App Store search results.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "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, "quote": null, "tags": []}, "local_spend_currency": {"name": "local_spend_currency", "description": "This currency value should match the respective organization's currency value.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "new_downloads": {"name": "new_downloads", "description": "App downloads from new users who have never before installed the respective app.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "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.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "taps": {"name": "taps", "description": "The number of times ad was tapped by users within the reporting time period.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "\"postgres\".\"apple_search_ads_integration_tests\".\"ad_group_report_data\"", "created_at": 1661548509.1750379}, "source.apple_search_ads_source.apple_search_ads.ad_history": {"fqn": ["apple_search_ads_source", "apple_search_ads", "ad_history"], "database": "postgres", "schema": "apple_search_ads_integration_tests", "unique_id": "source.apple_search_ads_source.apple_search_ads.ad_history", "package_name": "apple_search_ads_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "models/src_apple_search_ads.yml", "original_file_path": "models/src_apple_search_ads.yml", "name": "ad_history", "source_name": "apple_search_ads", "source_description": "", "loader": "Fivetran", "identifier": "ad_history_data", "resource_type": "source", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "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, "quote": null, "tags": []}, "modification_time": {"name": "modification_time", "description": "Timestamp of when the ad object was last modified.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "org_id": {"name": "org_id", "description": "Organization ID associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_id": {"name": "campaign_id", "description": "Campaign ID associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "ad_group_id": {"name": "ad_group_id", "description": "Ad group ID associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "name": {"name": "name", "description": "Ad name associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "id": {"name": "id", "description": "Ad ID associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "status": {"name": "status", "description": "The current status of the ad, values include ENABLED and PAUSED.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "\"postgres\".\"apple_search_ads_integration_tests\".\"ad_history_data\"", "created_at": 1661548509.1751082}, "source.apple_search_ads_source.apple_search_ads.ad_level_report": {"fqn": ["apple_search_ads_source", "apple_search_ads", "ad_level_report"], "database": "postgres", "schema": "apple_search_ads_integration_tests", "unique_id": "source.apple_search_ads_source.apple_search_ads.ad_level_report", "package_name": "apple_search_ads_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "models/src_apple_search_ads.yml", "original_file_path": "models/src_apple_search_ads.yml", "name": "ad_level_report", "source_name": "apple_search_ads", "source_description": "", "loader": "Fivetran", "identifier": "ad_report_data", "resource_type": "source", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "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, "quote": null, "tags": []}, "campaign_id": {"name": "campaign_id", "description": "Campaign ID associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "ad_group_id": {"name": "ad_group_id", "description": "Ad group ID associated with the record", "meta": {}, "data_type": null, "quote": null, "tags": []}, "ad_id": {"name": "ad_id", "description": "Ad ID associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "impressions": {"name": "impressions", "description": "Number of times your ad appeared in App Store search results.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "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, "quote": null, "tags": []}, "local_spend_currency": {"name": "local_spend_currency", "description": "This currency value should match the respective organization's currency value.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "new_downloads": {"name": "new_downloads", "description": "App downloads from new users who have never before installed the respective app.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "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.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "taps": {"name": "taps", "description": "The number of times ad was tapped by users within the reporting time period.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "\"postgres\".\"apple_search_ads_integration_tests\".\"ad_report_data\"", "created_at": 1661548509.175176}, "source.apple_search_ads_source.apple_search_ads.campaign_history": {"fqn": ["apple_search_ads_source", "apple_search_ads", "campaign_history"], "database": "postgres", "schema": "apple_search_ads_integration_tests", "unique_id": "source.apple_search_ads_source.apple_search_ads.campaign_history", "package_name": "apple_search_ads_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "models/src_apple_search_ads.yml", "original_file_path": "models/src_apple_search_ads.yml", "name": "campaign_history", "source_name": "apple_search_ads", "source_description": "", "loader": "Fivetran", "identifier": "campaign_history_data", "resource_type": "source", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "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, "quote": null, "tags": []}, "id": {"name": "id", "description": "Campaign ID associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "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, "quote": null, "tags": []}, "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, "quote": null, "tags": []}, "name": {"name": "name", "description": "Campaign name for the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "organization_id": {"name": "organization_id", "description": "Organization ID associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "status": {"name": "status", "description": "The current status of the campaign, values include ENABLED and PAUSED.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "\"postgres\".\"apple_search_ads_integration_tests\".\"campaign_history_data\"", "created_at": 1661548509.1752388}, "source.apple_search_ads_source.apple_search_ads.campaign_report": {"fqn": ["apple_search_ads_source", "apple_search_ads", "campaign_report"], "database": "postgres", "schema": "apple_search_ads_integration_tests", "unique_id": "source.apple_search_ads_source.apple_search_ads.campaign_report", "package_name": "apple_search_ads_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "models/src_apple_search_ads.yml", "original_file_path": "models/src_apple_search_ads.yml", "name": "campaign_report", "source_name": "apple_search_ads", "source_description": "", "loader": "Fivetran", "identifier": "campaign_report_data", "resource_type": "source", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "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, "quote": null, "tags": []}, "date": {"name": "date", "description": "Date for daily report aggregation.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "impressions": {"name": "impressions", "description": "Number of times your ad appeared in App Store search results.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "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, "quote": null, "tags": []}, "local_spend_currency": {"name": "local_spend_currency", "description": "This currency value should match the respective organization's currency value.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "new_downloads": {"name": "new_downloads", "description": "App downloads from new users who have never before installed the respective app.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "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.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "taps": {"name": "taps", "description": "The number of times ad was tapped by users within the reporting time period.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "\"postgres\".\"apple_search_ads_integration_tests\".\"campaign_report_data\"", "created_at": 1661548509.175307}, "source.apple_search_ads_source.apple_search_ads.keyword_history": {"fqn": ["apple_search_ads_source", "apple_search_ads", "keyword_history"], "database": "postgres", "schema": "apple_search_ads_integration_tests", "unique_id": "source.apple_search_ads_source.apple_search_ads.keyword_history", "package_name": "apple_search_ads_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "models/src_apple_search_ads.yml", "original_file_path": "models/src_apple_search_ads.yml", "name": "keyword_history", "source_name": "apple_search_ads", "source_description": "", "loader": "Fivetran", "identifier": "keyword_history_data", "resource_type": "source", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "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, "quote": null, "tags": []}, "id": {"name": "id", "description": "Keyword ID associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_id": {"name": "campaign_id", "description": "Campaign ID associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "ad_group_id": {"name": "ad_group_id", "description": "Ad group ID associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "bid_amount": {"name": "bid_amount", "description": "The bid amount to display your ad for the matching text value.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "bid_currency": {"name": "bid_currency", "description": "This currency value should match the respective organization's currency value.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "match_type": {"name": "match_type", "description": "Controls how ads are matched to user searches; EXACT or BROAD.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "status": {"name": "status", "description": "The current status of the keyword, values include ENABLED and PAUSED.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "text": {"name": "text", "description": "The word or phrase to match in user searches, to show respective ad.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "\"postgres\".\"apple_search_ads_integration_tests\".\"keyword_history_data\"", "created_at": 1661548509.1753752}, "source.apple_search_ads_source.apple_search_ads.keyword_report": {"fqn": ["apple_search_ads_source", "apple_search_ads", "keyword_report"], "database": "postgres", "schema": "apple_search_ads_integration_tests", "unique_id": "source.apple_search_ads_source.apple_search_ads.keyword_report", "package_name": "apple_search_ads_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "models/src_apple_search_ads.yml", "original_file_path": "models/src_apple_search_ads.yml", "name": "keyword_report", "source_name": "apple_search_ads", "source_description": "", "loader": "Fivetran", "identifier": "keyword_report_data", "resource_type": "source", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "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, "quote": null, "tags": []}, "date": {"name": "date", "description": "Date for daily report aggregation.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "impressions": {"name": "impressions", "description": "Number of times your ad appeared in App Store search results.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "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, "quote": null, "tags": []}, "local_spend_currency": {"name": "local_spend_currency", "description": "This currency value should match the respective organization's currency value.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "new_downloads": {"name": "new_downloads", "description": "App downloads from new users who have never before installed the respective app.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "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.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "taps": {"name": "taps", "description": "The number of times ad was tapped by users within the reporting time period.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "\"postgres\".\"apple_search_ads_integration_tests\".\"keyword_report_data\"", "created_at": 1661548509.1754391}, "source.apple_search_ads_source.apple_search_ads.organization": {"fqn": ["apple_search_ads_source", "apple_search_ads", "organization"], "database": "postgres", "schema": "apple_search_ads_integration_tests", "unique_id": "source.apple_search_ads_source.apple_search_ads.organization", "package_name": "apple_search_ads_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "models/src_apple_search_ads.yml", "original_file_path": "models/src_apple_search_ads.yml", "name": "organization", "source_name": "apple_search_ads", "source_description": "", "loader": "Fivetran", "identifier": "organization_data", "resource_type": "source", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "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, "quote": null, "tags": []}, "currency": {"name": "currency", "description": "Specified currency for respective organization.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "payment_model": {"name": "payment_model", "description": "Values include 'LOC', 'PAYG' or (payment method hasn't been set).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "organization_name": {"name": "organization_name", "description": "Name of organization.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "time_zone": {"name": "time_zone", "description": "Organization default timezone; values can be ORTZ or UTC.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "\"postgres\".\"apple_search_ads_integration_tests\".\"organization_data\"", "created_at": 1661548509.1755}, "source.apple_search_ads_source.apple_search_ads.search_term_report": {"fqn": ["apple_search_ads_source", "apple_search_ads", "search_term_report"], "database": "postgres", "schema": "apple_search_ads_integration_tests", "unique_id": "source.apple_search_ads_source.apple_search_ads.search_term_report", "package_name": "apple_search_ads_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "models/src_apple_search_ads.yml", "original_file_path": "models/src_apple_search_ads.yml", "name": "search_term_report", "source_name": "apple_search_ads", "source_description": "", "loader": "Fivetran", "identifier": "search_term_report_data", "resource_type": "source", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "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, "quote": null, "tags": []}, "ad_group_id": {"name": "ad_group_id", "description": "Ad group ID associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_id": {"name": "campaign_id", "description": "Campaign ID associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "date": {"name": "date", "description": "Date for daily report aggregation.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "ad_group_name": {"name": "ad_group_name", "description": "Ad group name.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "bid_amount_amount": {"name": "bid_amount_amount", "description": "The bid amount to display your ad for the matching text value.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "bid_amount_currency": {"name": "bid_amount_currency", "description": "This currency value should match the respective organization's currency value.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "keyword": {"name": "keyword", "description": "The word or phrase to match in user searches, to show respective ad.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "keyword_display_status": {"name": "keyword_display_status", "description": "The keyword display status can either be ACTIVE or PAUSED.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "keyword_id": {"name": "keyword_id", "description": "Keyword ID associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "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, "quote": null, "tags": []}, "local_spend_currency": {"name": "local_spend_currency", "description": "This currency value should match the respective organization's currency value.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "match_type": {"name": "match_type", "description": "Controls how ads are matched to user searches; values include EXACT, BROAD or AUTO.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "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, "quote": null, "tags": []}, "search_term_text": {"name": "search_term_text", "description": "The word or phrase to match of user searches.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "impressions": {"name": "impressions", "description": "Number of times your ad appeared in App Store search results.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "taps": {"name": "taps", "description": "The number of times ad was tapped by users within the reporting time period.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "new_downloads": {"name": "new_downloads", "description": "App downloads from new users who have never before installed the respective app.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "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.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "\"postgres\".\"apple_search_ads_integration_tests\".\"search_term_report_data\"", "created_at": 1661548509.175575}}, "macros": {"macro.dbt_postgres.postgres__get_catalog": {"unique_id": "macro.dbt_postgres.postgres__get_catalog", "package_name": "dbt_postgres", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/postgres", "path": "macros/catalog.sql", "original_file_path": "macros/catalog.sql", "name": "postgres__get_catalog", "macro_sql": "{% macro postgres__get_catalog(information_schema, schemas) -%}\n\n {%- call statement('catalog', fetch_result=True) -%}\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 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\n where (\n {%- for schema in schemas -%}\n upper(sch.nspname) = upper('{{ schema }}'){%- 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') -- o[r]dinary table, [v]iew, [f]oreign table, [p]artitioned table. Other values are [i]ndex, [S]equence, [c]omposite type, [t]OAST table, [m]aterialized view\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\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.159998}, "macro.dbt_postgres.postgres_get_relations": {"unique_id": "macro.dbt_postgres.postgres_get_relations", "package_name": "dbt_postgres", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/postgres", "path": "macros/relations.sql", "original_file_path": "macros/relations.sql", "name": "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 with relation as (\n select\n pg_rewrite.ev_class as class,\n pg_rewrite.oid as id\n from pg_rewrite\n ),\n class as (\n select\n oid as id,\n relname as name,\n relnamespace as schema,\n relkind as kind\n from pg_class\n ),\n dependency as (\n select\n pg_depend.objid as id,\n pg_depend.refobjid as ref\n from pg_depend\n ),\n schema as (\n select\n pg_namespace.oid as id,\n pg_namespace.nspname as name\n from pg_namespace\n where nspname != 'information_schema' and nspname not like 'pg\\_%'\n ),\n referenced as (\n select\n relation.id AS id,\n referenced_class.name ,\n referenced_class.schema ,\n referenced_class.kind\n from relation\n join class as referenced_class on relation.class=referenced_class.id\n where referenced_class.kind in ('r', 'v')\n ),\n relationships as (\n select\n referenced.name as referenced_name,\n referenced.schema as referenced_schema_id,\n dependent_class.name as dependent_name,\n dependent_class.schema as dependent_schema_id,\n referenced.kind as kind\n from referenced\n join dependency on referenced.id=dependency.id\n join class as dependent_class on dependency.ref=dependent_class.id\n where\n (referenced.name != dependent_class.name or\n referenced.schema != dependent_class.schema)\n )\n\n select\n referenced_schema.name as referenced_schema,\n relationships.referenced_name as referenced_name,\n dependent_schema.name as dependent_schema,\n relationships.dependent_name as dependent_name\n from relationships\n join schema as dependent_schema on relationships.dependent_schema_id=dependent_schema.id\n join schema as referenced_schema on relationships.referenced_schema_id=referenced_schema.id\n group by referenced_schema, referenced_name, dependent_schema, dependent_name\n order by referenced_schema, referenced_name, dependent_schema, dependent_name;\n\n {%- endcall -%}\n\n {{ return(load_result('relations').table) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.160745}, "macro.dbt_postgres.postgres__create_table_as": {"unique_id": "macro.dbt_postgres.postgres__create_table_as", "package_name": "dbt_postgres", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "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 as (\n {{ sql }}\n );\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.166263}, "macro.dbt_postgres.postgres__get_create_index_sql": {"unique_id": "macro.dbt_postgres.postgres__get_create_index_sql", "package_name": "dbt_postgres", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.166795}, "macro.dbt_postgres.postgres__create_schema": {"unique_id": "macro.dbt_postgres.postgres__create_schema", "package_name": "dbt_postgres", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.167128}, "macro.dbt_postgres.postgres__drop_schema": {"unique_id": "macro.dbt_postgres.postgres__drop_schema", "package_name": "dbt_postgres", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.167455}, "macro.dbt_postgres.postgres__get_columns_in_relation": {"unique_id": "macro.dbt_postgres.postgres__get_columns_in_relation", "package_name": "dbt_postgres", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement", "macro.dbt.sql_convert_columns_in_relation"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.167951}, "macro.dbt_postgres.postgres__list_relations_without_caching": {"unique_id": "macro.dbt_postgres.postgres__list_relations_without_caching", "package_name": "dbt_postgres", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "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 {% endcall %}\n {{ return(load_result('list_relations_without_caching').table) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.1683369}, "macro.dbt_postgres.postgres__information_schema_name": {"unique_id": "macro.dbt_postgres.postgres__information_schema_name", "package_name": "dbt_postgres", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.168519}, "macro.dbt_postgres.postgres__list_schemas": {"unique_id": "macro.dbt_postgres.postgres__list_schemas", "package_name": "dbt_postgres", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.1688871}, "macro.dbt_postgres.postgres__check_schema_exists": {"unique_id": "macro.dbt_postgres.postgres__check_schema_exists", "package_name": "dbt_postgres", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.169294}, "macro.dbt_postgres.postgres__current_timestamp": {"unique_id": "macro.dbt_postgres.postgres__current_timestamp", "package_name": "dbt_postgres", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "postgres__current_timestamp", "macro_sql": "{% macro postgres__current_timestamp() -%}\n now()\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.169375}, "macro.dbt_postgres.postgres__snapshot_string_as_time": {"unique_id": "macro.dbt_postgres.postgres__snapshot_string_as_time", "package_name": "dbt_postgres", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.1695879}, "macro.dbt_postgres.postgres__snapshot_get_time": {"unique_id": "macro.dbt_postgres.postgres__snapshot_get_time", "package_name": "dbt_postgres", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "postgres__snapshot_get_time", "macro_sql": "{% macro postgres__snapshot_get_time() -%}\n {{ current_timestamp() }}::timestamp without time zone\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.current_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.169695}, "macro.dbt_postgres.postgres__make_temp_relation": {"unique_id": "macro.dbt_postgres.postgres__make_temp_relation", "package_name": "dbt_postgres", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "postgres__make_temp_relation", "macro_sql": "{% macro postgres__make_temp_relation(base_relation, suffix) %}\n {% set dt = modules.datetime.datetime.now() %}\n {% set dtstring = dt.strftime(\"%H%M%S%f\") %}\n {% set suffix_length = suffix|length + dtstring|length %}\n {% set relation_max_name_length = 63 %}\n {% if suffix_length > relation_max_name_length %}\n {% do exceptions.raise_compiler_error('Temp relation suffix is too long (' ~ suffix|length ~ ' characters). Maximum length is ' ~ (relation_max_name_length - dtstring|length) ~ ' characters.') %}\n {% endif %}\n {% set tmp_identifier = base_relation.identifier[:relation_max_name_length - suffix_length] ~ suffix ~ dtstring %}\n {% do return(base_relation.incorporate(\n path={\n \"identifier\": tmp_identifier,\n \"schema\": none,\n \"database\": none\n })) -%}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.1707652}, "macro.dbt_postgres.postgres_escape_comment": {"unique_id": "macro.dbt_postgres.postgres_escape_comment", "package_name": "dbt_postgres", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.171296}, "macro.dbt_postgres.postgres__alter_relation_comment": {"unique_id": "macro.dbt_postgres.postgres__alter_relation_comment", "package_name": "dbt_postgres", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "postgres__alter_relation_comment", "macro_sql": "{% macro postgres__alter_relation_comment(relation, comment) %}\n {% set escaped_comment = postgres_escape_comment(comment) %}\n comment on {{ relation.type }} {{ relation }} is {{ escaped_comment }};\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_postgres.postgres_escape_comment"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.1715572}, "macro.dbt_postgres.postgres__alter_column_comment": {"unique_id": "macro.dbt_postgres.postgres__alter_column_comment", "package_name": "dbt_postgres", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_postgres.postgres_escape_comment"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.172184}, "macro.dbt_postgres.postgres__snapshot_merge_sql": {"unique_id": "macro.dbt_postgres.postgres__snapshot_merge_sql", "package_name": "dbt_postgres", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/postgres", "path": "macros/materializations/snapshot_merge.sql", "original_file_path": "macros/materializations/snapshot_merge.sql", "name": "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 update {{ target }}\n set dbt_valid_to = DBT_INTERNAL_SOURCE.dbt_valid_to\n from {{ source }} as DBT_INTERNAL_SOURCE\n where DBT_INTERNAL_SOURCE.dbt_scd_id::text = {{ target }}.dbt_scd_id::text\n and DBT_INTERNAL_SOURCE.dbt_change_type::text in ('update'::text, 'delete'::text)\n and {{ target }}.dbt_valid_to is null;\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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.173179}, "macro.dbt.run_hooks": {"unique_id": "macro.dbt.run_hooks", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/hooks.sql", "original_file_path": "macros/materializations/hooks.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.174458}, "macro.dbt.make_hook_config": {"unique_id": "macro.dbt.make_hook_config", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/hooks.sql", "original_file_path": "macros/materializations/hooks.sql", "name": "make_hook_config", "macro_sql": "{% macro make_hook_config(sql, inside_transaction) %}\n {{ tojson({\"sql\": sql, \"transaction\": inside_transaction}) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.174669}, "macro.dbt.before_begin": {"unique_id": "macro.dbt.before_begin", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/hooks.sql", "original_file_path": "macros/materializations/hooks.sql", "name": "before_begin", "macro_sql": "{% macro before_begin(sql) %}\n {{ make_hook_config(sql, inside_transaction=False) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.make_hook_config"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.1748211}, "macro.dbt.in_transaction": {"unique_id": "macro.dbt.in_transaction", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/hooks.sql", "original_file_path": "macros/materializations/hooks.sql", "name": "in_transaction", "macro_sql": "{% macro in_transaction(sql) %}\n {{ make_hook_config(sql, inside_transaction=True) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.make_hook_config"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.1749709}, "macro.dbt.after_commit": {"unique_id": "macro.dbt.after_commit", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/hooks.sql", "original_file_path": "macros/materializations/hooks.sql", "name": "after_commit", "macro_sql": "{% macro after_commit(sql) %}\n {{ make_hook_config(sql, inside_transaction=False) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.make_hook_config"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.175122}, "macro.dbt.set_sql_header": {"unique_id": "macro.dbt.set_sql_header", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/configs.sql", "original_file_path": "macros/materializations/configs.sql", "name": "set_sql_header", "macro_sql": "{% macro set_sql_header(config) -%}\n {{ config.set('sql_header', caller()) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.1756532}, "macro.dbt.should_full_refresh": {"unique_id": "macro.dbt.should_full_refresh", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/configs.sql", "original_file_path": "macros/materializations/configs.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.1759858}, "macro.dbt.should_store_failures": {"unique_id": "macro.dbt.should_store_failures", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/configs.sql", "original_file_path": "macros/materializations/configs.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.176307}, "macro.dbt.snapshot_merge_sql": {"unique_id": "macro.dbt.snapshot_merge_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/snapshot_merge.sql", "original_file_path": "macros/materializations/snapshots/snapshot_merge.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_postgres.postgres__snapshot_merge_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.17726}, "macro.dbt.default__snapshot_merge_sql": {"unique_id": "macro.dbt.default__snapshot_merge_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/snapshot_merge.sql", "original_file_path": "macros/materializations/snapshots/snapshot_merge.sql", "name": "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 merge into {{ target }} as DBT_INTERNAL_DEST\n using {{ source }} as DBT_INTERNAL_SOURCE\n on DBT_INTERNAL_SOURCE.dbt_scd_id = DBT_INTERNAL_DEST.dbt_scd_id\n\n when matched\n and DBT_INTERNAL_DEST.dbt_valid_to is null\n and DBT_INTERNAL_SOURCE.dbt_change_type in ('update', 'delete')\n then update\n set dbt_valid_to = DBT_INTERNAL_SOURCE.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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.17757}, "macro.dbt.strategy_dispatch": {"unique_id": "macro.dbt.strategy_dispatch", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.1815171}, "macro.dbt.snapshot_hash_arguments": {"unique_id": "macro.dbt.snapshot_hash_arguments", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "name": "snapshot_hash_arguments", "macro_sql": "{% macro snapshot_hash_arguments(args) -%}\n {{ adapter.dispatch('snapshot_hash_arguments', 'dbt')(args) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__snapshot_hash_arguments"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.181728}, "macro.dbt.default__snapshot_hash_arguments": {"unique_id": "macro.dbt.default__snapshot_hash_arguments", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.1820958}, "macro.dbt.snapshot_get_time": {"unique_id": "macro.dbt.snapshot_get_time", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "name": "snapshot_get_time", "macro_sql": "{% macro snapshot_get_time() -%}\n {{ adapter.dispatch('snapshot_get_time', 'dbt')() }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_postgres.postgres__snapshot_get_time"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.182295}, "macro.dbt.default__snapshot_get_time": {"unique_id": "macro.dbt.default__snapshot_get_time", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "name": "default__snapshot_get_time", "macro_sql": "{% macro default__snapshot_get_time() -%}\n {{ current_timestamp() }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.current_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.1824}, "macro.dbt.snapshot_timestamp_strategy": {"unique_id": "macro.dbt.snapshot_timestamp_strategy", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "name": "snapshot_timestamp_strategy", "macro_sql": "{% macro snapshot_timestamp_strategy(node, snapshotted_rel, current_rel, config, target_exists) %}\n {% set primary_key = config['unique_key'] %}\n {% set updated_at = config['updated_at'] %}\n {% set invalidate_hard_deletes = config.get('invalidate_hard_deletes', false) %}\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 }}.dbt_valid_from < {{ current_rel }}.{{ updated_at }})\n {%- endset %}\n\n {% set scd_id_expr = snapshot_hash_arguments([primary_key, updated_at]) %}\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 }) %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.snapshot_hash_arguments"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.183299}, "macro.dbt.snapshot_string_as_time": {"unique_id": "macro.dbt.snapshot_string_as_time", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "name": "snapshot_string_as_time", "macro_sql": "{% macro snapshot_string_as_time(timestamp) -%}\n {{ adapter.dispatch('snapshot_string_as_time', 'dbt')(timestamp) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_postgres.postgres__snapshot_string_as_time"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.183475}, "macro.dbt.default__snapshot_string_as_time": {"unique_id": "macro.dbt.default__snapshot_string_as_time", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.183656}, "macro.dbt.snapshot_check_all_get_existing_columns": {"unique_id": "macro.dbt.snapshot_check_all_get_existing_columns", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "name": "snapshot_check_all_get_existing_columns", "macro_sql": "{% macro snapshot_check_all_get_existing_columns(node, target_exists) -%}\n {%- set query_columns = get_columns_in_query(node['compiled_sql']) -%}\n {%- if not target_exists -%}\n {# no table yet -> return whatever the query does #}\n {{ return([false, query_columns]) }}\n {%- endif -%}\n {# handle any schema changes #}\n {%- set target_table = node.get('alias', node.get('name')) -%}\n {%- set target_relation = adapter.get_relation(database=node.database, schema=node.schema, identifier=target_table) -%}\n {%- set existing_cols = get_columns_in_query('select * from ' ~ target_relation) -%}\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(col) -%}\n {%- else -%}\n {% set ns.column_added = true %}\n {%- endif -%}\n {%- endfor -%}\n {{ return([ns.column_added, intersection]) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.get_columns_in_query"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.184662}, "macro.dbt.snapshot_check_strategy": {"unique_id": "macro.dbt.snapshot_check_strategy", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "name": "snapshot_check_strategy", "macro_sql": "{% macro snapshot_check_strategy(node, snapshotted_rel, current_rel, config, target_exists) %}\n {% set check_cols_config = config['check_cols'] %}\n {% set primary_key = config['unique_key'] %}\n {% set invalidate_hard_deletes = config.get('invalidate_hard_deletes', false) %}\n \n {% set select_current_time -%}\n select {{ snapshot_get_time() }} as snapshot_start\n {%- endset %}\n\n {#-- don't access the column by name, to avoid dealing with casing issues on snowflake #}\n {%- set now = run_query(select_current_time)[0][0] -%}\n {% if now is none or now is undefined -%}\n {%- do exceptions.raise_compiler_error('Could not get a snapshot start time from the database') -%}\n {%- endif %}\n {% set updated_at = config.get('updated_at', snapshot_string_as_time(now)) %}\n\n {% set column_added = false %}\n\n {% if check_cols_config == 'all' %}\n {% set column_added, check_cols = snapshot_check_all_get_existing_columns(node, target_exists) %}\n {% elif check_cols_config is iterable and (check_cols_config | length) > 0 %}\n {% set check_cols = check_cols_config %}\n {% else %}\n {% do exceptions.raise_compiler_error(\"Invalid value for 'check_cols': \" ~ check_cols_config) %}\n {% endif %}\n\n {%- set row_changed_expr -%}\n (\n {%- if column_added -%}\n TRUE\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_id_expr = snapshot_hash_arguments([primary_key, updated_at]) %}\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 }) %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.snapshot_get_time", "macro.dbt.run_query", "macro.dbt.snapshot_string_as_time", "macro.dbt.snapshot_check_all_get_existing_columns", "macro.dbt.snapshot_hash_arguments"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.186583}, "macro.dbt.create_columns": {"unique_id": "macro.dbt.create_columns", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "name": "create_columns", "macro_sql": "{% macro create_columns(relation, columns) %}\n {{ adapter.dispatch('create_columns', 'dbt')(relation, columns) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__create_columns"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.190138}, "macro.dbt.default__create_columns": {"unique_id": "macro.dbt.default__create_columns", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "name": "default__create_columns", "macro_sql": "{% macro default__create_columns(relation, columns) %}\n {% for column in columns %}\n {% call statement() %}\n alter table {{ relation }} add column \"{{ column.name }}\" {{ column.data_type }};\n {% endcall %}\n {% endfor %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.190455}, "macro.dbt.post_snapshot": {"unique_id": "macro.dbt.post_snapshot", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "name": "post_snapshot", "macro_sql": "{% macro post_snapshot(staging_relation) %}\n {{ adapter.dispatch('post_snapshot', 'dbt')(staging_relation) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__post_snapshot"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.190637}, "macro.dbt.default__post_snapshot": {"unique_id": "macro.dbt.default__post_snapshot", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "name": "default__post_snapshot", "macro_sql": "{% macro default__post_snapshot(staging_relation) %}\n {# no-op #}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.190737}, "macro.dbt.snapshot_staging_table": {"unique_id": "macro.dbt.snapshot_staging_table", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__snapshot_staging_table"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.1909661}, "macro.dbt.default__snapshot_staging_table": {"unique_id": "macro.dbt.default__snapshot_staging_table", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "name": "default__snapshot_staging_table", "macro_sql": "{% macro default__snapshot_staging_table(strategy, source_sql, target_relation) -%}\n\n with snapshot_query as (\n\n {{ source_sql }}\n\n ),\n\n snapshotted_data as (\n\n select *,\n {{ strategy.unique_key }} as dbt_unique_key\n\n from {{ target_relation }}\n where dbt_valid_to is null\n\n ),\n\n insertions_source_data as (\n\n select\n *,\n {{ strategy.unique_key }} as dbt_unique_key,\n {{ strategy.updated_at }} as dbt_updated_at,\n {{ strategy.updated_at }} as dbt_valid_from,\n nullif({{ strategy.updated_at }}, {{ strategy.updated_at }}) as dbt_valid_to,\n {{ strategy.scd_id }} as dbt_scd_id\n\n from snapshot_query\n ),\n\n updates_source_data as (\n\n select\n *,\n {{ strategy.unique_key }} as dbt_unique_key,\n {{ strategy.updated_at }} as dbt_updated_at,\n {{ strategy.updated_at }} as dbt_valid_from,\n {{ strategy.updated_at }} as dbt_valid_to\n\n from snapshot_query\n ),\n\n {%- if strategy.invalidate_hard_deletes %}\n\n deletes_source_data as (\n\n select \n *,\n {{ strategy.unique_key }} as dbt_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\n from insertions_source_data as source_data\n left outer join snapshotted_data on snapshotted_data.dbt_unique_key = source_data.dbt_unique_key\n where snapshotted_data.dbt_unique_key is null\n or (\n snapshotted_data.dbt_unique_key is not null\n and (\n {{ strategy.row_changed }}\n )\n )\n\n ),\n\n updates as (\n\n select\n 'update' as dbt_change_type,\n source_data.*,\n snapshotted_data.dbt_scd_id\n\n from updates_source_data as source_data\n join snapshotted_data on snapshotted_data.dbt_unique_key = source_data.dbt_unique_key\n where (\n {{ strategy.row_changed }}\n )\n )\n\n {%- if strategy.invalidate_hard_deletes -%}\n ,\n\n deletes as (\n \n select\n 'delete' as dbt_change_type,\n source_data.*,\n {{ snapshot_get_time() }} as dbt_valid_from,\n {{ snapshot_get_time() }} as dbt_updated_at,\n {{ snapshot_get_time() }} as dbt_valid_to,\n snapshotted_data.dbt_scd_id\n \n from snapshotted_data\n left join deletes_source_data as source_data on snapshotted_data.dbt_unique_key = source_data.dbt_unique_key\n where source_data.dbt_unique_key is null\n )\n {%- endif %}\n\n select * from insertions\n union all\n select * from updates\n {%- if strategy.invalidate_hard_deletes %}\n union all\n select * from deletes\n {%- endif %}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.snapshot_get_time"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.191875}, "macro.dbt.build_snapshot_table": {"unique_id": "macro.dbt.build_snapshot_table", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "name": "build_snapshot_table", "macro_sql": "{% macro build_snapshot_table(strategy, sql) -%}\n {{ adapter.dispatch('build_snapshot_table', 'dbt')(strategy, sql) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__build_snapshot_table"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.192076}, "macro.dbt.default__build_snapshot_table": {"unique_id": "macro.dbt.default__build_snapshot_table", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "name": "default__build_snapshot_table", "macro_sql": "{% macro default__build_snapshot_table(strategy, sql) %}\n\n select *,\n {{ strategy.scd_id }} as dbt_scd_id,\n {{ strategy.updated_at }} as dbt_updated_at,\n {{ strategy.updated_at }} as dbt_valid_from,\n nullif({{ strategy.updated_at }}, {{ strategy.updated_at }}) as dbt_valid_to\n from (\n {{ sql }}\n ) sbq\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.192339}, "macro.dbt.build_snapshot_staging_table": {"unique_id": "macro.dbt.build_snapshot_staging_table", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "name": "build_snapshot_staging_table", "macro_sql": "{% macro build_snapshot_staging_table(strategy, sql, target_relation) %}\n {% set tmp_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, tmp_relation, select) }}\n {% endcall %}\n\n {% do return(tmp_relation) %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "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}, "patch_path": null, "arguments": [], "created_at": 1661548508.192798}, "macro.dbt.materialization_snapshot_default": {"unique_id": "macro.dbt.materialization_snapshot_default", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/snapshot.sql", "original_file_path": "macros/materializations/snapshots/snapshot.sql", "name": "materialization_snapshot_default", "macro_sql": "{% materialization snapshot, default %}\n {%- set config = model['config'] -%}\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\n {% if not adapter.check_schema_exists(model.database, model.schema) %}\n {% do create_schema(model.database, model.schema) %}\n {% endif %}\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 {% set strategy = strategy_macro(model, \"snapshotted_data\", \"source_data\", config, target_relation_exists) %}\n\n {% if not target_relation_exists %}\n\n {% set build_sql = build_snapshot_table(strategy, model['compiled_sql']) %}\n {% set final_sql = create_table_as(False, target_relation, build_sql) %}\n\n {% else %}\n\n {{ adapter.valid_snapshot_target(target_relation) }}\n\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 missing_columns = adapter.get_missing_columns(staging_table, target_relation)\n | rejectattr('name', 'equalto', 'dbt_change_type')\n | rejectattr('name', 'equalto', 'DBT_CHANGE_TYPE')\n | rejectattr('name', 'equalto', 'dbt_unique_key')\n | rejectattr('name', 'equalto', 'DBT_UNIQUE_KEY')\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', 'equalto', 'dbt_change_type')\n | rejectattr('name', 'equalto', 'DBT_CHANGE_TYPE')\n | rejectattr('name', 'equalto', 'dbt_unique_key')\n | rejectattr('name', 'equalto', 'DBT_UNIQUE_KEY')\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 {% call statement('main') %}\n {{ final_sql }}\n {% endcall %}\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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.create_schema", "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.build_snapshot_staging_table", "macro.dbt.create_columns", "macro.dbt.snapshot_merge_sql", "macro.dbt.statement", "macro.dbt.persist_docs", "macro.dbt.create_indexes", "macro.dbt.post_snapshot"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.199323}, "macro.dbt.materialization_test_default": {"unique_id": "macro.dbt.materialization_test_default", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/tests/test.sql", "original_file_path": "macros/materializations/tests/test.sql", "name": "materialization_test_default", "macro_sql": "{%- materialization test, default -%}\n\n {% set relations = [] %}\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 {% set target_relation = api.Relation.create(\n identifier=identifier, schema=schema, database=database, type='table') -%} %}\n \n {% if old_relation %}\n {% do adapter.drop_relation(old_relation) %}\n {% endif %}\n \n {% call statement(auto_begin=True) %}\n {{ create_table_as(False, target_relation, sql) }}\n {% endcall %}\n \n {% do relations.append(target_relation) %}\n \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 %}\n \n {% endif %}\n\n {% set limit = config.get('limit') %}\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 {{ get_test_sql(main_sql, fail_calc, warn_if, error_if, limit)}}\n\n {%- endcall %}\n \n {{ return({'relations': relations}) }}\n\n{%- endmaterialization -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.should_store_failures", "macro.dbt.statement", "macro.dbt.create_table_as", "macro.dbt.get_test_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.201827}, "macro.dbt.get_test_sql": {"unique_id": "macro.dbt.get_test_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/tests/helpers.sql", "original_file_path": "macros/materializations/tests/helpers.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__get_test_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.202698}, "macro.dbt.default__get_test_sql": {"unique_id": "macro.dbt.default__get_test_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/tests/helpers.sql", "original_file_path": "macros/materializations/tests/helpers.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.2030761}, "macro.dbt.get_where_subquery": {"unique_id": "macro.dbt.get_where_subquery", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/tests/where_subquery.sql", "original_file_path": "macros/materializations/tests/where_subquery.sql", "name": "get_where_subquery", "macro_sql": "{% macro get_where_subquery(relation) -%}\n {% do return(adapter.dispatch('get_where_subquery', 'dbt')(relation)) %}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__get_where_subquery"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.203756}, "macro.dbt.default__get_where_subquery": {"unique_id": "macro.dbt.default__get_where_subquery", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/tests/where_subquery.sql", "original_file_path": "macros/materializations/tests/where_subquery.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.20419}, "macro.dbt.get_quoted_csv": {"unique_id": "macro.dbt.get_quoted_csv", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/column_helpers.sql", "original_file_path": "macros/materializations/models/incremental/column_helpers.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.2052631}, "macro.dbt.diff_columns": {"unique_id": "macro.dbt.diff_columns", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/column_helpers.sql", "original_file_path": "macros/materializations/models/incremental/column_helpers.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.205843}, "macro.dbt.diff_column_data_types": {"unique_id": "macro.dbt.diff_column_data_types", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/column_helpers.sql", "original_file_path": "macros/materializations/models/incremental/column_helpers.sql", "name": "diff_column_data_types", "macro_sql": "{% macro diff_column_data_types(source_columns, target_columns) %}\n \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.data_type != tc.data_type %}\n {{ result.append( { 'column_name': tc.name, 'new_type': sc.data_type } ) }} \n {% endif %}\n {% endif %}\n {% endfor %}\n\n {{ return(result) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.206521}, "macro.dbt.get_merge_sql": {"unique_id": "macro.dbt.get_merge_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/merge.sql", "original_file_path": "macros/materializations/models/incremental/merge.sql", "name": "get_merge_sql", "macro_sql": "{% macro get_merge_sql(target, source, unique_key, dest_columns, predicates=none) -%}\n {{ adapter.dispatch('get_merge_sql', 'dbt')(target, source, unique_key, dest_columns, predicates) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__get_merge_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.2095869}, "macro.dbt.default__get_merge_sql": {"unique_id": "macro.dbt.default__get_merge_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/merge.sql", "original_file_path": "macros/materializations/models/incremental/merge.sql", "name": "default__get_merge_sql", "macro_sql": "{% macro default__get_merge_sql(target, source, unique_key, dest_columns, predicates) -%}\n {%- set predicates = [] if predicates is none else [] + predicates -%}\n {%- set dest_cols_csv = get_quoted_csv(dest_columns | map(attribute=\"name\")) -%}\n {%- set update_columns = config.get('merge_update_columns', default = dest_columns | map(attribute=\"quoted\") | list) -%}\n {%- set sql_header = config.get('sql_header', none) -%}\n\n {% if unique_key %}\n {% set unique_key_match %}\n DBT_INTERNAL_SOURCE.{{ unique_key }} = DBT_INTERNAL_DEST.{{ unique_key }}\n {% endset %}\n {% do predicates.append(unique_key_match) %}\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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.get_quoted_csv"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.210933}, "macro.dbt.get_delete_insert_merge_sql": {"unique_id": "macro.dbt.get_delete_insert_merge_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/merge.sql", "original_file_path": "macros/materializations/models/incremental/merge.sql", "name": "get_delete_insert_merge_sql", "macro_sql": "{% macro get_delete_insert_merge_sql(target, source, unique_key, dest_columns) -%}\n {{ adapter.dispatch('get_delete_insert_merge_sql', 'dbt')(target, source, unique_key, dest_columns) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__get_delete_insert_merge_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.211262}, "macro.dbt.default__get_delete_insert_merge_sql": {"unique_id": "macro.dbt.default__get_delete_insert_merge_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/merge.sql", "original_file_path": "macros/materializations/models/incremental/merge.sql", "name": "default__get_delete_insert_merge_sql", "macro_sql": "{% macro default__get_delete_insert_merge_sql(target, source, unique_key, dest_columns) -%}\n\n {%- set dest_cols_csv = get_quoted_csv(dest_columns | map(attribute=\"name\")) -%}\n\n {% if unique_key is not none %}\n delete from {{ target }}\n where ({{ unique_key }}) in (\n select ({{ unique_key }})\n from {{ source }}\n );\n {% endif %}\n\n insert into {{ target }} ({{ dest_cols_csv }})\n (\n select {{ dest_cols_csv }}\n from {{ source }}\n )\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.get_quoted_csv"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.211715}, "macro.dbt.get_insert_overwrite_merge_sql": {"unique_id": "macro.dbt.get_insert_overwrite_merge_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/merge.sql", "original_file_path": "macros/materializations/models/incremental/merge.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__get_insert_overwrite_merge_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.211984}, "macro.dbt.default__get_insert_overwrite_merge_sql": {"unique_id": "macro.dbt.default__get_insert_overwrite_merge_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/merge.sql", "original_file_path": "macros/materializations/models/incremental/merge.sql", "name": "default__get_insert_overwrite_merge_sql", "macro_sql": "{% macro default__get_insert_overwrite_merge_sql(target, source, dest_columns, predicates, include_sql_header) -%}\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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.get_quoted_csv"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.212627}, "macro.dbt.is_incremental": {"unique_id": "macro.dbt.is_incremental", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/is_incremental.sql", "original_file_path": "macros/materializations/models/incremental/is_incremental.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.should_full_refresh"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.21361}, "macro.dbt.materialization_incremental_default": {"unique_id": "macro.dbt.materialization_incremental_default", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/incremental.sql", "original_file_path": "macros/materializations/models/incremental/incremental.sql", "name": "materialization_incremental_default", "macro_sql": "{% materialization incremental, default -%}\n\n {% set unique_key = config.get('unique_key') %}\n\n {% set target_relation = this.incorporate(type='table') %}\n {% set existing_relation = load_relation(this) %}\n {% set tmp_relation = make_temp_relation(target_relation) %}\n {%- set full_refresh_mode = (should_full_refresh()) -%}\n\n {% set on_schema_change = incremental_validate_on_schema_change(config.get('on_schema_change'), default='ignore') %}\n\n {% set tmp_identifier = model['name'] + '__dbt_tmp' %}\n {% set backup_identifier = model['name'] + \"__dbt_backup\" %}\n\n -- the intermediate_ 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 = adapter.get_relation(identifier=tmp_identifier, \n schema=schema,\n database=database) %} \n {% set preexisting_backup_relation = adapter.get_relation(identifier=backup_identifier,\n schema=schema,\n database=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 {% set to_drop = [] %}\n\n {# -- first check whether we want to full refresh for source view or config reasons #}\n {% set trigger_full_refresh = (full_refresh_mode or existing_relation.is_view) %}\n\n {% if existing_relation is none %}\n {% set build_sql = create_table_as(False, target_relation, sql) %}\n{% elif trigger_full_refresh %}\n {#-- Make sure the backup doesn't exist so we don't encounter issues with the rename below #}\n {% set tmp_identifier = model['name'] + '__dbt_tmp' %}\n {% set backup_identifier = model['name'] + '__dbt_backup' %}\n {% set intermediate_relation = existing_relation.incorporate(path={\"identifier\": tmp_identifier}) %}\n {% set backup_relation = existing_relation.incorporate(path={\"identifier\": backup_identifier}) %}\n\n {% set build_sql = create_table_as(False, intermediate_relation, sql) %}\n {% set need_swap = true %}\n {% do to_drop.append(backup_relation) %}\n {% else %}\n {% do run_query(create_table_as(True, tmp_relation, sql)) %}\n {% do adapter.expand_target_column_types(\n from_relation=tmp_relation,\n to_relation=target_relation) %}\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, tmp_relation, existing_relation) %}\n {% if not dest_columns %}\n {% set dest_columns = adapter.get_columns_in_relation(existing_relation) %}\n {% endif %}\n {% set build_sql = get_delete_insert_merge_sql(target_relation, tmp_relation, unique_key, dest_columns) %}\n \n {% endif %}\n\n {% call statement(\"main\") %}\n {{ build_sql }}\n {% endcall %}\n\n {% if need_swap %} \n {% do adapter.rename_relation(target_relation, backup_relation) %} \n {% do adapter.rename_relation(intermediate_relation, target_relation) %} \n {% endif %}\n\n {% do persist_docs(target_relation, model) %}\n\n {% if existing_relation is none or existing_relation.is_view or should_full_refresh() %}\n {% do create_indexes(target_relation) %}\n {% endif %}\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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.load_relation", "macro.dbt.make_temp_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.create_table_as", "macro.dbt.run_query", "macro.dbt.process_schema_changes", "macro.dbt.get_delete_insert_merge_sql", "macro.dbt.statement", "macro.dbt.persist_docs", "macro.dbt.create_indexes"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.218805}, "macro.dbt.incremental_validate_on_schema_change": {"unique_id": "macro.dbt.incremental_validate_on_schema_change", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/on_schema_change.sql", "original_file_path": "macros/materializations/models/incremental/on_schema_change.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.2238069}, "macro.dbt.check_for_schema_changes": {"unique_id": "macro.dbt.check_for_schema_changes", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/on_schema_change.sql", "original_file_path": "macros/materializations/models/incremental/on_schema_change.sql", "name": "check_for_schema_changes", "macro_sql": "{% macro 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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.diff_columns", "macro.dbt.diff_column_data_types"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.2251961}, "macro.dbt.sync_column_schemas": {"unique_id": "macro.dbt.sync_column_schemas", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/on_schema_change.sql", "original_file_path": "macros/materializations/models/incremental/on_schema_change.sql", "name": "sync_column_schemas", "macro_sql": "{% macro 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\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 {%- 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 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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.alter_relation_add_remove_columns", "macro.dbt.alter_column_type"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.226474}, "macro.dbt.process_schema_changes": {"unique_id": "macro.dbt.process_schema_changes", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/on_schema_change.sql", "original_file_path": "macros/materializations/models/incremental/on_schema_change.sql", "name": "process_schema_changes", "macro_sql": "{% macro 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 {% 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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.check_for_schema_changes", "macro.dbt.sync_column_schemas"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.227215}, "macro.dbt.materialization_table_default": {"unique_id": "macro.dbt.materialization_table_default", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/table/table.sql", "original_file_path": "macros/materializations/models/table/table.sql", "name": "materialization_table_default", "macro_sql": "{% materialization table, default %}\n {%- set identifier = model['alias'] -%}\n {%- set tmp_identifier = model['name'] + '__dbt_tmp' -%}\n {%- set backup_identifier = model['name'] + '__dbt_backup' -%}\n\n {%- set old_relation = adapter.get_relation(database=database, schema=schema, identifier=identifier) -%}\n {%- set target_relation = api.Relation.create(identifier=identifier,\n schema=schema,\n database=database,\n type='table') -%}\n {%- set intermediate_relation = api.Relation.create(identifier=tmp_identifier,\n schema=schema,\n database=database,\n type='table') -%}\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 = adapter.get_relation(identifier=tmp_identifier, \n schema=schema,\n database=database) -%}\n /*\n See ../view/view.sql for more information about this relation.\n */\n {%- set backup_relation_type = 'table' if old_relation is none else old_relation.type -%}\n {%- set backup_relation = api.Relation.create(identifier=backup_identifier,\n schema=schema,\n database=database,\n type=backup_relation_type) -%}\n -- as above, the backup_relation should not already exist\n {%- set preexisting_backup_relation = adapter.get_relation(identifier=backup_identifier,\n schema=schema,\n database=database) -%}\n\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 -- cleanup\n {% if old_relation is not none %}\n {{ adapter.rename_relation(old_relation, backup_relation) }}\n {% endif %}\n\n {{ adapter.rename_relation(intermediate_relation, target_relation) }}\n\n {% do create_indexes(target_relation) %}\n\n {{ run_hooks(post_hooks, inside_transaction=True) }}\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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["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.persist_docs"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.231159}, "macro.dbt.get_create_table_as_sql": {"unique_id": "macro.dbt.get_create_table_as_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/table/create_table_as.sql", "original_file_path": "macros/materializations/models/table/create_table_as.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__get_create_table_as_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.231734}, "macro.dbt.default__get_create_table_as_sql": {"unique_id": "macro.dbt.default__get_create_table_as_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/table/create_table_as.sql", "original_file_path": "macros/materializations/models/table/create_table_as.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.create_table_as"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.231929}, "macro.dbt.create_table_as": {"unique_id": "macro.dbt.create_table_as", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/table/create_table_as.sql", "original_file_path": "macros/materializations/models/table/create_table_as.sql", "name": "create_table_as", "macro_sql": "{% macro create_table_as(temporary, relation, sql) -%}\n {{ adapter.dispatch('create_table_as', 'dbt')(temporary, relation, sql) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_postgres.postgres__create_table_as"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.2321339}, "macro.dbt.default__create_table_as": {"unique_id": "macro.dbt.default__create_table_as", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/table/create_table_as.sql", "original_file_path": "macros/materializations/models/table/create_table_as.sql", "name": "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 as (\n {{ sql }}\n );\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.232573}, "macro.dbt.materialization_view_default": {"unique_id": "macro.dbt.materialization_view_default", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/view/view.sql", "original_file_path": "macros/materializations/models/view/view.sql", "name": "materialization_view_default", "macro_sql": "{%- materialization view, default -%}\n\n {%- set identifier = model['alias'] -%}\n {%- set tmp_identifier = model['name'] + '__dbt_tmp' -%}\n {%- set backup_identifier = model['name'] + '__dbt_backup' -%}\n\n {%- set old_relation = adapter.get_relation(database=database, schema=schema, identifier=identifier) -%}\n {%- set target_relation = api.Relation.create(identifier=identifier, schema=schema, database=database,\n type='view') -%}\n {%- set intermediate_relation = api.Relation.create(identifier=tmp_identifier,\n schema=schema, database=database, type='view') -%}\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 = adapter.get_relation(identifier=tmp_identifier, \n schema=schema,\n database=database) -%}\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 \"old_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 old_relation, if it exists,\n or else \"view\" as a sane default if it does not. Note that if the old_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 old_relation is none else old_relation.type -%}\n {%- set backup_relation = api.Relation.create(identifier=backup_identifier,\n schema=schema, database=database,\n type=backup_relation_type) -%}\n -- as above, the backup_relation should not already exist\n {%- set preexisting_backup_relation = adapter.get_relation(identifier=backup_identifier,\n schema=schema,\n database=database) -%}\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 {{ create_view_as(intermediate_relation, sql) }}\n {%- endcall %}\n\n -- cleanup\n -- move the existing view out of the way\n {% if old_relation is not none %}\n {{ adapter.rename_relation(old_relation, backup_relation) }}\n {% endif %}\n {{ adapter.rename_relation(intermediate_relation, target_relation) }}\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 -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.run_hooks", "macro.dbt.drop_relation_if_exists", "macro.dbt.statement", "macro.dbt.create_view_as", "macro.dbt.persist_docs"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.236574}, "macro.dbt.handle_existing_table": {"unique_id": "macro.dbt.handle_existing_table", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/view/helpers.sql", "original_file_path": "macros/materializations/models/view/helpers.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__handle_existing_table"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.23711}, "macro.dbt.default__handle_existing_table": {"unique_id": "macro.dbt.default__handle_existing_table", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/view/helpers.sql", "original_file_path": "macros/materializations/models/view/helpers.sql", "name": "default__handle_existing_table", "macro_sql": "{% macro default__handle_existing_table(full_refresh, old_relation) %}\n {{ log(\"Dropping relation \" ~ old_relation ~ \" because it is of type \" ~ old_relation.type) }}\n {{ adapter.drop_relation(old_relation) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.237349}, "macro.dbt.create_or_replace_view": {"unique_id": "macro.dbt.create_or_replace_view", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/view/create_or_replace_view.sql", "original_file_path": "macros/materializations/models/view/create_or_replace_view.sql", "name": "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\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\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 {{ run_hooks(post_hooks) }}\n\n {{ return({'relations': [target_relation]}) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "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"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.238846}, "macro.dbt.get_create_view_as_sql": {"unique_id": "macro.dbt.get_create_view_as_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/view/create_view_as.sql", "original_file_path": "macros/materializations/models/view/create_view_as.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__get_create_view_as_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.2426848}, "macro.dbt.default__get_create_view_as_sql": {"unique_id": "macro.dbt.default__get_create_view_as_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/view/create_view_as.sql", "original_file_path": "macros/materializations/models/view/create_view_as.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.create_view_as"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.242867}, "macro.dbt.create_view_as": {"unique_id": "macro.dbt.create_view_as", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/view/create_view_as.sql", "original_file_path": "macros/materializations/models/view/create_view_as.sql", "name": "create_view_as", "macro_sql": "{% macro create_view_as(relation, sql) -%}\n {{ adapter.dispatch('create_view_as', 'dbt')(relation, sql) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__create_view_as"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.243057}, "macro.dbt.default__create_view_as": {"unique_id": "macro.dbt.default__create_view_as", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/view/create_view_as.sql", "original_file_path": "macros/materializations/models/view/create_view_as.sql", "name": "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 }} as (\n {{ sql }}\n );\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.243329}, "macro.dbt.materialization_seed_default": {"unique_id": "macro.dbt.materialization_seed_default", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/seeds/seed.sql", "original_file_path": "macros/materializations/seeds/seed.sql", "name": "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 agate_table = load_agate_table() -%}\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)) }}\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 = load_csv_rows(model, agate_table) %}\n\n {% call noop_statement('main', code ~ ' ' ~ rows_affected, code, rows_affected) %}\n {{ create_table_sql }};\n -- dbt seed --\n {{ sql }}\n {% endcall %}\n\n {% set target_relation = this.incorporate(type='table') %}\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 %}", "resource_type": "macro", "tags": [], "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.persist_docs", "macro.dbt.create_indexes"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.246557}, "macro.dbt.create_csv_table": {"unique_id": "macro.dbt.create_csv_table", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "name": "create_csv_table", "macro_sql": "{% macro create_csv_table(model, agate_table) -%}\n {{ adapter.dispatch('create_csv_table', 'dbt')(model, agate_table) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__create_csv_table"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.250768}, "macro.dbt.default__create_csv_table": {"unique_id": "macro.dbt.default__create_csv_table", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.2516532}, "macro.dbt.reset_csv_table": {"unique_id": "macro.dbt.reset_csv_table", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__reset_csv_table"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.251883}, "macro.dbt.default__reset_csv_table": {"unique_id": "macro.dbt.default__reset_csv_table", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "name": "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 %}\n {% endif %}\n\n {{ return(sql) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.create_csv_table"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.2525141}, "macro.dbt.get_binding_char": {"unique_id": "macro.dbt.get_binding_char", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "name": "get_binding_char", "macro_sql": "{% macro get_binding_char() -%}\n {{ adapter.dispatch('get_binding_char', 'dbt')() }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__get_binding_char"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.252722}, "macro.dbt.default__get_binding_char": {"unique_id": "macro.dbt.default__get_binding_char", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "name": "default__get_binding_char", "macro_sql": "{% macro default__get_binding_char() %}\n {{ return('%s') }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.252852}, "macro.dbt.get_batch_size": {"unique_id": "macro.dbt.get_batch_size", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "name": "get_batch_size", "macro_sql": "{% macro get_batch_size() -%}\n {{ return(adapter.dispatch('get_batch_size', 'dbt')()) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__get_batch_size"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.253024}, "macro.dbt.default__get_batch_size": {"unique_id": "macro.dbt.default__get_batch_size", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "name": "default__get_batch_size", "macro_sql": "{% macro default__get_batch_size() %}\n {{ return(10000) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.2531462}, "macro.dbt.get_seed_column_quoted_csv": {"unique_id": "macro.dbt.get_seed_column_quoted_csv", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.2536771}, "macro.dbt.load_csv_rows": {"unique_id": "macro.dbt.load_csv_rows", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "name": "load_csv_rows", "macro_sql": "{% macro load_csv_rows(model, agate_table) -%}\n {{ adapter.dispatch('load_csv_rows', 'dbt')(model, agate_table) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__load_csv_rows"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.253994}, "macro.dbt.default__load_csv_rows": {"unique_id": "macro.dbt.default__load_csv_rows", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "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}, "patch_path": null, "arguments": [], "created_at": 1661548508.255297}, "macro.dbt.generate_alias_name": {"unique_id": "macro.dbt.generate_alias_name", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/get_custom_name/get_custom_alias.sql", "original_file_path": "macros/get_custom_name/get_custom_alias.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__generate_alias_name"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.255927}, "macro.dbt.default__generate_alias_name": {"unique_id": "macro.dbt.default__generate_alias_name", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/get_custom_name/get_custom_alias.sql", "original_file_path": "macros/get_custom_name/get_custom_alias.sql", "name": "default__generate_alias_name", "macro_sql": "{% macro default__generate_alias_name(custom_alias_name=none, node=none) -%}\n\n {%- if custom_alias_name is none -%}\n\n {{ node.name }}\n\n {%- else -%}\n\n {{ custom_alias_name | trim }}\n\n {%- endif -%}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.256164}, "macro.dbt.generate_schema_name": {"unique_id": "macro.dbt.generate_schema_name", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/get_custom_name/get_custom_schema.sql", "original_file_path": "macros/get_custom_name/get_custom_schema.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__generate_schema_name"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.256769}, "macro.dbt.default__generate_schema_name": {"unique_id": "macro.dbt.default__generate_schema_name", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/get_custom_name/get_custom_schema.sql", "original_file_path": "macros/get_custom_name/get_custom_schema.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.257038}, "macro.dbt.generate_schema_name_for_env": {"unique_id": "macro.dbt.generate_schema_name_for_env", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/get_custom_name/get_custom_schema.sql", "original_file_path": "macros/get_custom_name/get_custom_schema.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.257329}, "macro.dbt.generate_database_name": {"unique_id": "macro.dbt.generate_database_name", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/get_custom_name/get_custom_database.sql", "original_file_path": "macros/get_custom_name/get_custom_database.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__generate_database_name"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.257803}, "macro.dbt.default__generate_database_name": {"unique_id": "macro.dbt.default__generate_database_name", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/get_custom_name/get_custom_database.sql", "original_file_path": "macros/get_custom_name/get_custom_database.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.25806}, "macro.dbt.default__test_relationships": {"unique_id": "macro.dbt.default__test_relationships", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/generic_test_sql/relationships.sql", "original_file_path": "macros/generic_test_sql/relationships.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.25849}, "macro.dbt.default__test_not_null": {"unique_id": "macro.dbt.default__test_not_null", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/generic_test_sql/not_null.sql", "original_file_path": "macros/generic_test_sql/not_null.sql", "name": "default__test_not_null", "macro_sql": "{% macro default__test_not_null(model, column_name) %}\n\nselect *\nfrom {{ model }}\nwhere {{ column_name }} is null\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.258751}, "macro.dbt.default__test_unique": {"unique_id": "macro.dbt.default__test_unique", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/generic_test_sql/unique.sql", "original_file_path": "macros/generic_test_sql/unique.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.2590709}, "macro.dbt.default__test_accepted_values": {"unique_id": "macro.dbt.default__test_accepted_values", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/generic_test_sql/accepted_values.sql", "original_file_path": "macros/generic_test_sql/accepted_values.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.259721}, "macro.dbt.statement": {"unique_id": "macro.dbt.statement", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/etc/statement.sql", "original_file_path": "macros/etc/statement.sql", "name": "statement", "macro_sql": "{% macro statement(name=None, fetch_result=False, auto_begin=True) -%}\n {%- if execute: -%}\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 {%- set res, table = adapter.execute(sql, auto_begin=auto_begin, fetch=fetch_result) -%}\n {%- if name is not none -%}\n {{ store_result(name, response=res, agate_table=table) }}\n {%- endif -%}\n\n {%- endif -%}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.2609868}, "macro.dbt.noop_statement": {"unique_id": "macro.dbt.noop_statement", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/etc/statement.sql", "original_file_path": "macros/etc/statement.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.2616189}, "macro.dbt.run_query": {"unique_id": "macro.dbt.run_query", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/etc/statement.sql", "original_file_path": "macros/etc/statement.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.2619379}, "macro.dbt.convert_datetime": {"unique_id": "macro.dbt.convert_datetime", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/etc/datetime.sql", "original_file_path": "macros/etc/datetime.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.2638621}, "macro.dbt.dates_in_range": {"unique_id": "macro.dbt.dates_in_range", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/etc/datetime.sql", "original_file_path": "macros/etc/datetime.sql", "name": "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 Partiton 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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.convert_datetime"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.265345}, "macro.dbt.partition_range": {"unique_id": "macro.dbt.partition_range", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/etc/datetime.sql", "original_file_path": "macros/etc/datetime.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.dates_in_range"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.266177}, "macro.dbt.py_current_timestring": {"unique_id": "macro.dbt.py_current_timestring", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/etc/datetime.sql", "original_file_path": "macros/etc/datetime.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.2664351}, "macro.dbt.create_schema": {"unique_id": "macro.dbt.create_schema", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/schema.sql", "original_file_path": "macros/adapters/schema.sql", "name": "create_schema", "macro_sql": "{% macro create_schema(relation) -%}\n {{ adapter.dispatch('create_schema', 'dbt')(relation) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_postgres.postgres__create_schema"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.2670028}, "macro.dbt.default__create_schema": {"unique_id": "macro.dbt.default__create_schema", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/schema.sql", "original_file_path": "macros/adapters/schema.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.267211}, "macro.dbt.drop_schema": {"unique_id": "macro.dbt.drop_schema", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/schema.sql", "original_file_path": "macros/adapters/schema.sql", "name": "drop_schema", "macro_sql": "{% macro drop_schema(relation) -%}\n {{ adapter.dispatch('drop_schema', 'dbt')(relation) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_postgres.postgres__drop_schema"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.2673972}, "macro.dbt.default__drop_schema": {"unique_id": "macro.dbt.default__drop_schema", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/schema.sql", "original_file_path": "macros/adapters/schema.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.2675898}, "macro.dbt.get_create_index_sql": {"unique_id": "macro.dbt.get_create_index_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/indexes.sql", "original_file_path": "macros/adapters/indexes.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_postgres.postgres__get_create_index_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.2682781}, "macro.dbt.default__get_create_index_sql": {"unique_id": "macro.dbt.default__get_create_index_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/indexes.sql", "original_file_path": "macros/adapters/indexes.sql", "name": "default__get_create_index_sql", "macro_sql": "{% macro default__get_create_index_sql(relation, index_dict) -%}\n {% do return(None) %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.268428}, "macro.dbt.create_indexes": {"unique_id": "macro.dbt.create_indexes", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/indexes.sql", "original_file_path": "macros/adapters/indexes.sql", "name": "create_indexes", "macro_sql": "{% macro create_indexes(relation) -%}\n {{ adapter.dispatch('create_indexes', 'dbt')(relation) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__create_indexes"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.2686}, "macro.dbt.default__create_indexes": {"unique_id": "macro.dbt.default__create_indexes", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/indexes.sql", "original_file_path": "macros/adapters/indexes.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.get_create_index_sql", "macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.2690308}, "macro.dbt.make_temp_relation": {"unique_id": "macro.dbt.make_temp_relation", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "name": "make_temp_relation", "macro_sql": "{% macro make_temp_relation(base_relation, suffix='__dbt_tmp') %}\n {{ return(adapter.dispatch('make_temp_relation', 'dbt')(base_relation, suffix))}}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_postgres.postgres__make_temp_relation"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.27114}, "macro.dbt.default__make_temp_relation": {"unique_id": "macro.dbt.default__make_temp_relation", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "name": "default__make_temp_relation", "macro_sql": "{% macro default__make_temp_relation(base_relation, suffix) %}\n {% set tmp_identifier = base_relation.identifier ~ suffix %}\n {% set tmp_relation = base_relation.incorporate(\n path={\"identifier\": tmp_identifier}) -%}\n\n {% do return(tmp_relation) %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.271488}, "macro.dbt.drop_relation": {"unique_id": "macro.dbt.drop_relation", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "name": "drop_relation", "macro_sql": "{% macro drop_relation(relation) -%}\n {{ return(adapter.dispatch('drop_relation', 'dbt')(relation)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__drop_relation"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.271693}, "macro.dbt.default__drop_relation": {"unique_id": "macro.dbt.default__drop_relation", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "name": "default__drop_relation", "macro_sql": "{% macro default__drop_relation(relation) -%}\n {% call statement('drop_relation', auto_begin=False) -%}\n drop {{ relation.type }} if exists {{ relation }} cascade\n {%- endcall %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.271921}, "macro.dbt.truncate_relation": {"unique_id": "macro.dbt.truncate_relation", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "name": "truncate_relation", "macro_sql": "{% macro truncate_relation(relation) -%}\n {{ return(adapter.dispatch('truncate_relation', 'dbt')(relation)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__truncate_relation"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.272119}, "macro.dbt.default__truncate_relation": {"unique_id": "macro.dbt.default__truncate_relation", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "name": "default__truncate_relation", "macro_sql": "{% macro default__truncate_relation(relation) -%}\n {% call statement('truncate_relation') -%}\n truncate table {{ relation }}\n {%- endcall %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.272289}, "macro.dbt.rename_relation": {"unique_id": "macro.dbt.rename_relation", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "name": "rename_relation", "macro_sql": "{% macro rename_relation(from_relation, to_relation) -%}\n {{ return(adapter.dispatch('rename_relation', 'dbt')(from_relation, to_relation)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__rename_relation"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.272526}, "macro.dbt.default__rename_relation": {"unique_id": "macro.dbt.default__rename_relation", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "name": "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 }} rename to {{ target_name }}\n {%- endcall %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.272827}, "macro.dbt.get_or_create_relation": {"unique_id": "macro.dbt.get_or_create_relation", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__get_or_create_relation"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.273103}, "macro.dbt.default__get_or_create_relation": {"unique_id": "macro.dbt.default__get_or_create_relation", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.27381}, "macro.dbt.load_relation": {"unique_id": "macro.dbt.load_relation", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "name": "load_relation", "macro_sql": "{% macro load_relation(relation) %}\n {% do return(adapter.get_relation(\n database=relation.database,\n schema=relation.schema,\n identifier=relation.identifier\n )) -%}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.274057}, "macro.dbt.drop_relation_if_exists": {"unique_id": "macro.dbt.drop_relation_if_exists", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.2742689}, "macro.dbt.current_timestamp": {"unique_id": "macro.dbt.current_timestamp", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/freshness.sql", "original_file_path": "macros/adapters/freshness.sql", "name": "current_timestamp", "macro_sql": "{% macro current_timestamp() -%}\n {{ adapter.dispatch('current_timestamp', 'dbt')() }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_postgres.postgres__current_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.275241}, "macro.dbt.default__current_timestamp": {"unique_id": "macro.dbt.default__current_timestamp", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/freshness.sql", "original_file_path": "macros/adapters/freshness.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.275417}, "macro.dbt.collect_freshness": {"unique_id": "macro.dbt.collect_freshness", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/freshness.sql", "original_file_path": "macros/adapters/freshness.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.fivetran_utils.default__collect_freshness"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.275669}, "macro.dbt.default__collect_freshness": {"unique_id": "macro.dbt.default__collect_freshness", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/freshness.sql", "original_file_path": "macros/adapters/freshness.sql", "name": "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').table) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement", "macro.dbt_utils.current_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.276125}, "macro.dbt.alter_column_comment": {"unique_id": "macro.dbt.alter_column_comment", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/persist_docs.sql", "original_file_path": "macros/adapters/persist_docs.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_postgres.postgres__alter_column_comment"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.276984}, "macro.dbt.default__alter_column_comment": {"unique_id": "macro.dbt.default__alter_column_comment", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/persist_docs.sql", "original_file_path": "macros/adapters/persist_docs.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.277171}, "macro.dbt.alter_relation_comment": {"unique_id": "macro.dbt.alter_relation_comment", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/persist_docs.sql", "original_file_path": "macros/adapters/persist_docs.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_postgres.postgres__alter_relation_comment"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.2773938}, "macro.dbt.default__alter_relation_comment": {"unique_id": "macro.dbt.default__alter_relation_comment", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/persist_docs.sql", "original_file_path": "macros/adapters/persist_docs.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.2775738}, "macro.dbt.persist_docs": {"unique_id": "macro.dbt.persist_docs", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/persist_docs.sql", "original_file_path": "macros/adapters/persist_docs.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__persist_docs"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.277856}, "macro.dbt.default__persist_docs": {"unique_id": "macro.dbt.default__persist_docs", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/persist_docs.sql", "original_file_path": "macros/adapters/persist_docs.sql", "name": "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 {% do run_query(alter_column_comment(relation, model.columns)) %}\n {% endif %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.run_query", "macro.dbt.alter_relation_comment", "macro.dbt.alter_column_comment"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.278381}, "macro.dbt.get_catalog": {"unique_id": "macro.dbt.get_catalog", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "name": "get_catalog", "macro_sql": "{% macro get_catalog(information_schema, schemas) -%}\n {{ return(adapter.dispatch('get_catalog', 'dbt')(information_schema, schemas)) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_postgres.postgres__get_catalog"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.280094}, "macro.dbt.default__get_catalog": {"unique_id": "macro.dbt.default__get_catalog", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.280399}, "macro.dbt.information_schema_name": {"unique_id": "macro.dbt.information_schema_name", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "name": "information_schema_name", "macro_sql": "{% macro information_schema_name(database) %}\n {{ return(adapter.dispatch('information_schema_name', 'dbt')(database)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_postgres.postgres__information_schema_name"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.2806}, "macro.dbt.default__information_schema_name": {"unique_id": "macro.dbt.default__information_schema_name", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.280757}, "macro.dbt.list_schemas": {"unique_id": "macro.dbt.list_schemas", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "name": "list_schemas", "macro_sql": "{% macro list_schemas(database) -%}\n {{ return(adapter.dispatch('list_schemas', 'dbt')(database)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_postgres.postgres__list_schemas"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.2809532}, "macro.dbt.default__list_schemas": {"unique_id": "macro.dbt.default__list_schemas", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.information_schema_name", "macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.281207}, "macro.dbt.check_schema_exists": {"unique_id": "macro.dbt.check_schema_exists", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_postgres.postgres__check_schema_exists"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.281427}, "macro.dbt.default__check_schema_exists": {"unique_id": "macro.dbt.default__check_schema_exists", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.replace", "macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.28184}, "macro.dbt.list_relations_without_caching": {"unique_id": "macro.dbt.list_relations_without_caching", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_postgres.postgres__list_relations_without_caching"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.2820349}, "macro.dbt.default__list_relations_without_caching": {"unique_id": "macro.dbt.default__list_relations_without_caching", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.282196}, "macro.dbt.get_columns_in_relation": {"unique_id": "macro.dbt.get_columns_in_relation", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "name": "get_columns_in_relation", "macro_sql": "{% macro get_columns_in_relation(relation) -%}\n {{ return(adapter.dispatch('get_columns_in_relation', 'dbt')(relation)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_postgres.postgres__get_columns_in_relation"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.2841659}, "macro.dbt.default__get_columns_in_relation": {"unique_id": "macro.dbt.default__get_columns_in_relation", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.284329}, "macro.dbt.sql_convert_columns_in_relation": {"unique_id": "macro.dbt.sql_convert_columns_in_relation", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.2846668}, "macro.dbt.get_columns_in_query": {"unique_id": "macro.dbt.get_columns_in_query", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__get_columns_in_query"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.2848651}, "macro.dbt.default__get_columns_in_query": {"unique_id": "macro.dbt.default__get_columns_in_query", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "name": "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 select * from (\n {{ select_sql }}\n ) as __dbt_sbq\n where false\n limit 0\n {% endcall %}\n\n {{ return(load_result('get_columns_in_query').table.columns | map(attribute='name') | list) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.285219}, "macro.dbt.alter_column_type": {"unique_id": "macro.dbt.alter_column_type", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__alter_column_type"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.285467}, "macro.dbt.default__alter_column_type": {"unique_id": "macro.dbt.default__alter_column_type", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "name": "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 }} add column {{ adapter.quote(tmp_column) }} {{ new_column_type }};\n update {{ relation }} set {{ adapter.quote(tmp_column) }} = {{ adapter.quote(column_name) }};\n alter table {{ relation }} drop column {{ adapter.quote(column_name) }} cascade;\n alter table {{ relation }} rename column {{ adapter.quote(tmp_column) }} to {{ adapter.quote(column_name) }}\n {% endcall %}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.286106}, "macro.dbt.alter_relation_add_remove_columns": {"unique_id": "macro.dbt.alter_relation_add_remove_columns", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__alter_relation_add_remove_columns"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.2863739}, "macro.dbt.default__alter_relation_add_remove_columns": {"unique_id": "macro.dbt.default__alter_relation_add_remove_columns", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "name": "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 }}\n \n {% for column in add_columns %}\n add column {{ column.name }} {{ column.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.name }}{{ ',' if not loop.last }}\n {% endfor %}\n \n {%- endset -%}\n\n {% do run_query(sql) %}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.287173}, "macro.dbt.test_unique": {"unique_id": "macro.dbt.test_unique", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "tests/generic/builtin.sql", "original_file_path": "tests/generic/builtin.sql", "name": "test_unique", "macro_sql": "{% test unique(model, column_name) %}\n {% set macro = adapter.dispatch('test_unique', 'dbt') %}\n {{ macro(model, column_name) }}\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__test_unique"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.287848}, "macro.dbt.test_not_null": {"unique_id": "macro.dbt.test_not_null", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "tests/generic/builtin.sql", "original_file_path": "tests/generic/builtin.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__test_not_null"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.2880929}, "macro.dbt.test_accepted_values": {"unique_id": "macro.dbt.test_accepted_values", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "tests/generic/builtin.sql", "original_file_path": "tests/generic/builtin.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__test_accepted_values"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.288397}, "macro.dbt.test_relationships": {"unique_id": "macro.dbt.test_relationships", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "tests/generic/builtin.sql", "original_file_path": "tests/generic/builtin.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__test_relationships"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.288686}, "macro.dbt_utils.except": {"unique_id": "macro.dbt_utils.except", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/except.sql", "original_file_path": "macros/cross_db_utils/except.sql", "name": "except", "macro_sql": "{% macro except() %}\n {{ return(adapter.dispatch('except', 'dbt_utils')()) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__except"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.2890391}, "macro.dbt_utils.default__except": {"unique_id": "macro.dbt_utils.default__except", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/except.sql", "original_file_path": "macros/cross_db_utils/except.sql", "name": "default__except", "macro_sql": "{% macro default__except() %}\n\n except\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.289119}, "macro.dbt_utils.bigquery__except": {"unique_id": "macro.dbt_utils.bigquery__except", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/except.sql", "original_file_path": "macros/cross_db_utils/except.sql", "name": "bigquery__except", "macro_sql": "{% macro bigquery__except() %}\n\n except distinct\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.289191}, "macro.dbt_utils.replace": {"unique_id": "macro.dbt_utils.replace", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/replace.sql", "original_file_path": "macros/cross_db_utils/replace.sql", "name": "replace", "macro_sql": "{% macro replace(field, old_chars, new_chars) -%}\n {{ return(adapter.dispatch('replace', 'dbt_utils') (field, old_chars, new_chars)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__replace"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.289598}, "macro.dbt_utils.default__replace": {"unique_id": "macro.dbt_utils.default__replace", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/replace.sql", "original_file_path": "macros/cross_db_utils/replace.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.28977}, "macro.dbt_utils.concat": {"unique_id": "macro.dbt_utils.concat", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/concat.sql", "original_file_path": "macros/cross_db_utils/concat.sql", "name": "concat", "macro_sql": "{% macro concat(fields) -%}\n {{ return(adapter.dispatch('concat', 'dbt_utils')(fields)) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__concat"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.290306}, "macro.dbt_utils.default__concat": {"unique_id": "macro.dbt_utils.default__concat", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/concat.sql", "original_file_path": "macros/cross_db_utils/concat.sql", "name": "default__concat", "macro_sql": "{% macro default__concat(fields) -%}\n {{ fields|join(' || ') }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.2905548}, "macro.dbt_utils.type_string": {"unique_id": "macro.dbt_utils.type_string", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datatypes.sql", "original_file_path": "macros/cross_db_utils/datatypes.sql", "name": "type_string", "macro_sql": "\n\n{%- macro type_string() -%}\n {{ return(adapter.dispatch('type_string', 'dbt_utils')()) }}\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.postgres__type_string"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.291374}, "macro.dbt_utils.default__type_string": {"unique_id": "macro.dbt_utils.default__type_string", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datatypes.sql", "original_file_path": "macros/cross_db_utils/datatypes.sql", "name": "default__type_string", "macro_sql": "{% macro default__type_string() %}\n string\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.29147}, "macro.dbt_utils.redshift__type_string": {"unique_id": "macro.dbt_utils.redshift__type_string", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datatypes.sql", "original_file_path": "macros/cross_db_utils/datatypes.sql", "name": "redshift__type_string", "macro_sql": "\n\n{%- macro redshift__type_string() -%}\n varchar\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.29155}, "macro.dbt_utils.postgres__type_string": {"unique_id": "macro.dbt_utils.postgres__type_string", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datatypes.sql", "original_file_path": "macros/cross_db_utils/datatypes.sql", "name": "postgres__type_string", "macro_sql": "{% macro postgres__type_string() %}\n varchar\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.291625}, "macro.dbt_utils.snowflake__type_string": {"unique_id": "macro.dbt_utils.snowflake__type_string", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datatypes.sql", "original_file_path": "macros/cross_db_utils/datatypes.sql", "name": "snowflake__type_string", "macro_sql": "{% macro snowflake__type_string() %}\n varchar\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.291698}, "macro.dbt_utils.type_timestamp": {"unique_id": "macro.dbt_utils.type_timestamp", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datatypes.sql", "original_file_path": "macros/cross_db_utils/datatypes.sql", "name": "type_timestamp", "macro_sql": "\n\n{%- macro type_timestamp() -%}\n {{ return(adapter.dispatch('type_timestamp', 'dbt_utils')()) }}\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.postgres__type_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.291866}, "macro.dbt_utils.default__type_timestamp": {"unique_id": "macro.dbt_utils.default__type_timestamp", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datatypes.sql", "original_file_path": "macros/cross_db_utils/datatypes.sql", "name": "default__type_timestamp", "macro_sql": "{% macro default__type_timestamp() %}\n timestamp\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.2919428}, "macro.dbt_utils.postgres__type_timestamp": {"unique_id": "macro.dbt_utils.postgres__type_timestamp", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datatypes.sql", "original_file_path": "macros/cross_db_utils/datatypes.sql", "name": "postgres__type_timestamp", "macro_sql": "{% macro postgres__type_timestamp() %}\n timestamp without time zone\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.29202}, "macro.dbt_utils.snowflake__type_timestamp": {"unique_id": "macro.dbt_utils.snowflake__type_timestamp", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datatypes.sql", "original_file_path": "macros/cross_db_utils/datatypes.sql", "name": "snowflake__type_timestamp", "macro_sql": "{% macro snowflake__type_timestamp() %}\n timestamp_ntz\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.292088}, "macro.dbt_utils.type_float": {"unique_id": "macro.dbt_utils.type_float", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datatypes.sql", "original_file_path": "macros/cross_db_utils/datatypes.sql", "name": "type_float", "macro_sql": "\n\n{%- macro type_float() -%}\n {{ return(adapter.dispatch('type_float', 'dbt_utils')()) }}\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__type_float"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.292255}, "macro.dbt_utils.default__type_float": {"unique_id": "macro.dbt_utils.default__type_float", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datatypes.sql", "original_file_path": "macros/cross_db_utils/datatypes.sql", "name": "default__type_float", "macro_sql": "{% macro default__type_float() %}\n float\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.292328}, "macro.dbt_utils.bigquery__type_float": {"unique_id": "macro.dbt_utils.bigquery__type_float", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datatypes.sql", "original_file_path": "macros/cross_db_utils/datatypes.sql", "name": "bigquery__type_float", "macro_sql": "{% macro bigquery__type_float() %}\n float64\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.2924008}, "macro.dbt_utils.type_numeric": {"unique_id": "macro.dbt_utils.type_numeric", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datatypes.sql", "original_file_path": "macros/cross_db_utils/datatypes.sql", "name": "type_numeric", "macro_sql": "\n\n{%- macro type_numeric() -%}\n {{ return(adapter.dispatch('type_numeric', 'dbt_utils')()) }}\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__type_numeric"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.2925708}, "macro.dbt_utils.default__type_numeric": {"unique_id": "macro.dbt_utils.default__type_numeric", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datatypes.sql", "original_file_path": "macros/cross_db_utils/datatypes.sql", "name": "default__type_numeric", "macro_sql": "{% macro default__type_numeric() %}\n numeric(28, 6)\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.292653}, "macro.dbt_utils.bigquery__type_numeric": {"unique_id": "macro.dbt_utils.bigquery__type_numeric", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datatypes.sql", "original_file_path": "macros/cross_db_utils/datatypes.sql", "name": "bigquery__type_numeric", "macro_sql": "{% macro bigquery__type_numeric() %}\n numeric\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.29273}, "macro.dbt_utils.type_bigint": {"unique_id": "macro.dbt_utils.type_bigint", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datatypes.sql", "original_file_path": "macros/cross_db_utils/datatypes.sql", "name": "type_bigint", "macro_sql": "\n\n{%- macro type_bigint() -%}\n {{ return(adapter.dispatch('type_bigint', 'dbt_utils')()) }}\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__type_bigint"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.292904}, "macro.dbt_utils.default__type_bigint": {"unique_id": "macro.dbt_utils.default__type_bigint", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datatypes.sql", "original_file_path": "macros/cross_db_utils/datatypes.sql", "name": "default__type_bigint", "macro_sql": "{% macro default__type_bigint() %}\n bigint\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.292979}, "macro.dbt_utils.bigquery__type_bigint": {"unique_id": "macro.dbt_utils.bigquery__type_bigint", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datatypes.sql", "original_file_path": "macros/cross_db_utils/datatypes.sql", "name": "bigquery__type_bigint", "macro_sql": "{% macro bigquery__type_bigint() %}\n int64\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.2930508}, "macro.dbt_utils.type_int": {"unique_id": "macro.dbt_utils.type_int", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datatypes.sql", "original_file_path": "macros/cross_db_utils/datatypes.sql", "name": "type_int", "macro_sql": "\n\n{%- macro type_int() -%}\n {{ return(adapter.dispatch('type_int', 'dbt_utils')()) }}\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__type_int"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.2932942}, "macro.dbt_utils.default__type_int": {"unique_id": "macro.dbt_utils.default__type_int", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datatypes.sql", "original_file_path": "macros/cross_db_utils/datatypes.sql", "name": "default__type_int", "macro_sql": "{% macro default__type_int() %}\n int\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.2933729}, "macro.dbt_utils.bigquery__type_int": {"unique_id": "macro.dbt_utils.bigquery__type_int", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datatypes.sql", "original_file_path": "macros/cross_db_utils/datatypes.sql", "name": "bigquery__type_int", "macro_sql": "{% macro bigquery__type_int() %}\n int64\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.293445}, "macro.dbt_utils._is_relation": {"unique_id": "macro.dbt_utils._is_relation", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/_is_relation.sql", "original_file_path": "macros/cross_db_utils/_is_relation.sql", "name": "_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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.294049}, "macro.dbt_utils.cast_array_to_string": {"unique_id": "macro.dbt_utils.cast_array_to_string", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/cast_array_to_string.sql", "original_file_path": "macros/cross_db_utils/cast_array_to_string.sql", "name": "cast_array_to_string", "macro_sql": "{% macro cast_array_to_string(array) %}\n {{ adapter.dispatch('cast_array_to_string', 'dbt_utils') (array) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.postgres__cast_array_to_string"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.294543}, "macro.dbt_utils.default__cast_array_to_string": {"unique_id": "macro.dbt_utils.default__cast_array_to_string", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/cast_array_to_string.sql", "original_file_path": "macros/cross_db_utils/cast_array_to_string.sql", "name": "default__cast_array_to_string", "macro_sql": "{% macro default__cast_array_to_string(array) %}\n cast({{ array }} as {{ dbt_utils.type_string() }})\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.type_string"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.294683}, "macro.dbt_utils.postgres__cast_array_to_string": {"unique_id": "macro.dbt_utils.postgres__cast_array_to_string", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/cast_array_to_string.sql", "original_file_path": "macros/cross_db_utils/cast_array_to_string.sql", "name": "postgres__cast_array_to_string", "macro_sql": "{% macro postgres__cast_array_to_string(array) %}\n {%- set array_as_string -%}cast({{ array }} as {{ dbt_utils.type_string() }}){%- endset -%}\n {{ dbt_utils.replace(dbt_utils.replace(array_as_string,\"'}'\",\"']'\"),\"'{'\",\"'['\") }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.type_string", "macro.dbt_utils.replace"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.294996}, "macro.dbt_utils.redshift__cast_array_to_string": {"unique_id": "macro.dbt_utils.redshift__cast_array_to_string", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/cast_array_to_string.sql", "original_file_path": "macros/cross_db_utils/cast_array_to_string.sql", "name": "redshift__cast_array_to_string", "macro_sql": "{% macro redshift__cast_array_to_string(array) %}\n cast({{ array }} as {{ dbt_utils.type_string() }})\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.type_string"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.295151}, "macro.dbt_utils.bigquery__cast_array_to_string": {"unique_id": "macro.dbt_utils.bigquery__cast_array_to_string", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/cast_array_to_string.sql", "original_file_path": "macros/cross_db_utils/cast_array_to_string.sql", "name": "bigquery__cast_array_to_string", "macro_sql": "{% macro bigquery__cast_array_to_string(array) %}\n '['||(select string_agg(cast(element as string), ',') from unnest({{ array }}) element)||']'\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.295257}, "macro.dbt_utils.length": {"unique_id": "macro.dbt_utils.length", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/length.sql", "original_file_path": "macros/cross_db_utils/length.sql", "name": "length", "macro_sql": "{% macro length(expression) -%}\n {{ return(adapter.dispatch('length', 'dbt_utils') (expression)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__length"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.295663}, "macro.dbt_utils.default__length": {"unique_id": "macro.dbt_utils.default__length", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/length.sql", "original_file_path": "macros/cross_db_utils/length.sql", "name": "default__length", "macro_sql": "{% macro default__length(expression) %}\n \n length(\n {{ expression }}\n )\n \n{%- endmacro -%}\n\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.2957718}, "macro.dbt_utils.redshift__length": {"unique_id": "macro.dbt_utils.redshift__length", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/length.sql", "original_file_path": "macros/cross_db_utils/length.sql", "name": "redshift__length", "macro_sql": "{% macro redshift__length(expression) %}\n\n len(\n {{ expression }}\n )\n \n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.295872}, "macro.dbt_utils.dateadd": {"unique_id": "macro.dbt_utils.dateadd", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/dateadd.sql", "original_file_path": "macros/cross_db_utils/dateadd.sql", "name": "dateadd", "macro_sql": "{% macro dateadd(datepart, interval, from_date_or_timestamp) %}\n {{ return(adapter.dispatch('dateadd', 'dbt_utils')(datepart, interval, from_date_or_timestamp)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.postgres__dateadd"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.2965078}, "macro.dbt_utils.default__dateadd": {"unique_id": "macro.dbt_utils.default__dateadd", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/dateadd.sql", "original_file_path": "macros/cross_db_utils/dateadd.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.296683}, "macro.dbt_utils.bigquery__dateadd": {"unique_id": "macro.dbt_utils.bigquery__dateadd", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/dateadd.sql", "original_file_path": "macros/cross_db_utils/dateadd.sql", "name": "bigquery__dateadd", "macro_sql": "{% macro bigquery__dateadd(datepart, interval, from_date_or_timestamp) %}\n\n datetime_add(\n cast( {{ from_date_or_timestamp }} as datetime),\n interval {{ interval }} {{ datepart }}\n )\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.296844}, "macro.dbt_utils.postgres__dateadd": {"unique_id": "macro.dbt_utils.postgres__dateadd", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/dateadd.sql", "original_file_path": "macros/cross_db_utils/dateadd.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.297005}, "macro.dbt_utils.redshift__dateadd": {"unique_id": "macro.dbt_utils.redshift__dateadd", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/dateadd.sql", "original_file_path": "macros/cross_db_utils/dateadd.sql", "name": "redshift__dateadd", "macro_sql": "{% macro redshift__dateadd(datepart, interval, from_date_or_timestamp) %}\n\n {{ return(dbt_utils.default__dateadd(datepart, interval, from_date_or_timestamp)) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__dateadd"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.2972102}, "macro.dbt_utils.intersect": {"unique_id": "macro.dbt_utils.intersect", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/intersect.sql", "original_file_path": "macros/cross_db_utils/intersect.sql", "name": "intersect", "macro_sql": "{% macro intersect() %}\n {{ return(adapter.dispatch('intersect', 'dbt_utils')()) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__intersect"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.297573}, "macro.dbt_utils.default__intersect": {"unique_id": "macro.dbt_utils.default__intersect", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/intersect.sql", "original_file_path": "macros/cross_db_utils/intersect.sql", "name": "default__intersect", "macro_sql": "{% macro default__intersect() %}\n\n intersect\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.297653}, "macro.dbt_utils.bigquery__intersect": {"unique_id": "macro.dbt_utils.bigquery__intersect", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/intersect.sql", "original_file_path": "macros/cross_db_utils/intersect.sql", "name": "bigquery__intersect", "macro_sql": "{% macro bigquery__intersect() %}\n\n intersect distinct\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.297726}, "macro.dbt_utils.escape_single_quotes": {"unique_id": "macro.dbt_utils.escape_single_quotes", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/escape_single_quotes.sql", "original_file_path": "macros/cross_db_utils/escape_single_quotes.sql", "name": "escape_single_quotes", "macro_sql": "{% macro escape_single_quotes(expression) %}\n {{ return(adapter.dispatch('escape_single_quotes', 'dbt_utils') (expression)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__escape_single_quotes"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.298152}, "macro.dbt_utils.default__escape_single_quotes": {"unique_id": "macro.dbt_utils.default__escape_single_quotes", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/escape_single_quotes.sql", "original_file_path": "macros/cross_db_utils/escape_single_quotes.sql", "name": "default__escape_single_quotes", "macro_sql": "{% macro default__escape_single_quotes(expression) -%}\n{{ expression | replace(\"'\",\"''\") }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.298302}, "macro.dbt_utils.snowflake__escape_single_quotes": {"unique_id": "macro.dbt_utils.snowflake__escape_single_quotes", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/escape_single_quotes.sql", "original_file_path": "macros/cross_db_utils/escape_single_quotes.sql", "name": "snowflake__escape_single_quotes", "macro_sql": "{% macro snowflake__escape_single_quotes(expression) -%}\n{{ expression | replace(\"'\", \"\\\\'\") }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.298545}, "macro.dbt_utils.bigquery__escape_single_quotes": {"unique_id": "macro.dbt_utils.bigquery__escape_single_quotes", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/escape_single_quotes.sql", "original_file_path": "macros/cross_db_utils/escape_single_quotes.sql", "name": "bigquery__escape_single_quotes", "macro_sql": "{% macro bigquery__escape_single_quotes(expression) -%}\n{{ expression | replace(\"'\", \"\\\\'\") }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.2986891}, "macro.dbt_utils.right": {"unique_id": "macro.dbt_utils.right", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/right.sql", "original_file_path": "macros/cross_db_utils/right.sql", "name": "right", "macro_sql": "{% macro right(string_text, length_expression) -%}\n {{ return(adapter.dispatch('right', 'dbt_utils') (string_text, length_expression)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__right"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.299328}, "macro.dbt_utils.default__right": {"unique_id": "macro.dbt_utils.default__right", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/right.sql", "original_file_path": "macros/cross_db_utils/right.sql", "name": "default__right", "macro_sql": "{% macro default__right(string_text, length_expression) %}\n\n right(\n {{ string_text }},\n {{ length_expression }}\n )\n \n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.2994702}, "macro.dbt_utils.bigquery__right": {"unique_id": "macro.dbt_utils.bigquery__right", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/right.sql", "original_file_path": "macros/cross_db_utils/right.sql", "name": "bigquery__right", "macro_sql": "{% macro bigquery__right(string_text, length_expression) %}\n\n case when {{ length_expression }} = 0 \n then ''\n else \n substr(\n {{ string_text }},\n -1 * ({{ length_expression }})\n )\n end\n\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.299631}, "macro.dbt_utils.snowflake__right": {"unique_id": "macro.dbt_utils.snowflake__right", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/right.sql", "original_file_path": "macros/cross_db_utils/right.sql", "name": "snowflake__right", "macro_sql": "{% macro snowflake__right(string_text, length_expression) %}\n\n case when {{ length_expression }} = 0 \n then ''\n else \n right(\n {{ string_text }},\n {{ length_expression }}\n )\n end\n\n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.299797}, "macro.dbt_utils.listagg": {"unique_id": "macro.dbt_utils.listagg", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/listagg.sql", "original_file_path": "macros/cross_db_utils/listagg.sql", "name": "listagg", "macro_sql": "{% macro listagg(measure, delimiter_text=\"','\", order_by_clause=none, limit_num=none) -%}\n {{ return(adapter.dispatch('listagg', 'dbt_utils') (measure, delimiter_text, order_by_clause, limit_num)) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.postgres__listagg"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.3021681}, "macro.dbt_utils.default__listagg": {"unique_id": "macro.dbt_utils.default__listagg", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/listagg.sql", "original_file_path": "macros/cross_db_utils/listagg.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.302598}, "macro.dbt_utils.bigquery__listagg": {"unique_id": "macro.dbt_utils.bigquery__listagg", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/listagg.sql", "original_file_path": "macros/cross_db_utils/listagg.sql", "name": "bigquery__listagg", "macro_sql": "{% macro bigquery__listagg(measure, delimiter_text, order_by_clause, limit_num) -%}\n\n string_agg(\n {{ measure }},\n {{ delimiter_text }}\n {% if order_by_clause -%}\n {{ order_by_clause }}\n {%- endif %}\n {% if limit_num -%}\n limit {{ limit_num }}\n {%- endif %}\n )\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.302892}, "macro.dbt_utils.postgres__listagg": {"unique_id": "macro.dbt_utils.postgres__listagg", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/listagg.sql", "original_file_path": "macros/cross_db_utils/listagg.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.303307}, "macro.dbt_utils.redshift__listagg": {"unique_id": "macro.dbt_utils.redshift__listagg", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/listagg.sql", "original_file_path": "macros/cross_db_utils/listagg.sql", "name": "redshift__listagg", "macro_sql": "{% macro redshift__listagg(measure, delimiter_text, order_by_clause, limit_num) -%}\n\n {% if limit_num -%}\n {% set ns = namespace() %}\n {% set ns.delimiter_text_regex = delimiter_text|trim(\"'\") %}\n {% set special_chars %}\\,^,$,.,|,?,*,+,(,),[,],{,}{% endset %} \n {%- for char in special_chars.split(',') -%}\n {% set escape_char %}\\\\{{ char }}{% endset %}\n {% set ns.delimiter_text_regex = ns.delimiter_text_regex|replace(char,escape_char) %}\n {%- endfor -%}\n\n {% set regex %}'([^{{ ns.delimiter_text_regex }}]+{{ ns.delimiter_text_regex }}){1,{{ limit_num - 1}}}[^{{ ns.delimiter_text_regex }}]+'{% endset %}\n regexp_substr(\n listagg(\n {{ measure }},\n {{ delimiter_text }}\n )\n {% if order_by_clause -%}\n within group ({{ order_by_clause }})\n {%- endif %}\n ,{{ regex }}\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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.304306}, "macro.dbt_utils.datediff": {"unique_id": "macro.dbt_utils.datediff", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datediff.sql", "original_file_path": "macros/cross_db_utils/datediff.sql", "name": "datediff", "macro_sql": "{% macro datediff(first_date, second_date, datepart) %}\n {{ return(adapter.dispatch('datediff', 'dbt_utils')(first_date, second_date, datepart)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.postgres__datediff"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.306992}, "macro.dbt_utils.default__datediff": {"unique_id": "macro.dbt_utils.default__datediff", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datediff.sql", "original_file_path": "macros/cross_db_utils/datediff.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.307157}, "macro.dbt_utils.bigquery__datediff": {"unique_id": "macro.dbt_utils.bigquery__datediff", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datediff.sql", "original_file_path": "macros/cross_db_utils/datediff.sql", "name": "bigquery__datediff", "macro_sql": "{% macro bigquery__datediff(first_date, second_date, datepart) -%}\n\n datetime_diff(\n cast({{second_date}} as datetime),\n cast({{first_date}} as datetime),\n {{datepart}}\n )\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.307322}, "macro.dbt_utils.postgres__datediff": {"unique_id": "macro.dbt_utils.postgres__datediff", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datediff.sql", "original_file_path": "macros/cross_db_utils/datediff.sql", "name": "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 ({{ dbt_utils.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_utils.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_utils.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_utils.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_utils.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_utils.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_utils.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_utils.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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.datediff"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.3090749}, "macro.dbt_utils.redshift__datediff": {"unique_id": "macro.dbt_utils.redshift__datediff", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/datediff.sql", "original_file_path": "macros/cross_db_utils/datediff.sql", "name": "redshift__datediff", "macro_sql": "{% macro redshift__datediff(first_date, second_date, datepart) -%}\n\n {{ return(dbt_utils.default__datediff(first_date, second_date, datepart)) }}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__datediff"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.3092742}, "macro.dbt_utils.safe_cast": {"unique_id": "macro.dbt_utils.safe_cast", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/safe_cast.sql", "original_file_path": "macros/cross_db_utils/safe_cast.sql", "name": "safe_cast", "macro_sql": "{% macro safe_cast(field, type) %}\n {{ return(adapter.dispatch('safe_cast', 'dbt_utils') (field, type)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__safe_cast"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.309759}, "macro.dbt_utils.default__safe_cast": {"unique_id": "macro.dbt_utils.default__safe_cast", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/safe_cast.sql", "original_file_path": "macros/cross_db_utils/safe_cast.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.3098931}, "macro.dbt_utils.snowflake__safe_cast": {"unique_id": "macro.dbt_utils.snowflake__safe_cast", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/safe_cast.sql", "original_file_path": "macros/cross_db_utils/safe_cast.sql", "name": "snowflake__safe_cast", "macro_sql": "{% macro snowflake__safe_cast(field, type) %}\n try_cast({{field}} as {{type}})\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.310014}, "macro.dbt_utils.bigquery__safe_cast": {"unique_id": "macro.dbt_utils.bigquery__safe_cast", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/safe_cast.sql", "original_file_path": "macros/cross_db_utils/safe_cast.sql", "name": "bigquery__safe_cast", "macro_sql": "{% macro bigquery__safe_cast(field, type) %}\n safe_cast({{field}} as {{type}})\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.3101351}, "macro.dbt_utils.hash": {"unique_id": "macro.dbt_utils.hash", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/hash.sql", "original_file_path": "macros/cross_db_utils/hash.sql", "name": "hash", "macro_sql": "{% macro hash(field) -%}\n {{ return(adapter.dispatch('hash', 'dbt_utils') (field)) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__hash"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.310484}, "macro.dbt_utils.default__hash": {"unique_id": "macro.dbt_utils.default__hash", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/hash.sql", "original_file_path": "macros/cross_db_utils/hash.sql", "name": "default__hash", "macro_sql": "{% macro default__hash(field) -%}\n md5(cast({{field}} as {{dbt_utils.type_string()}}))\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.type_string"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.310622}, "macro.dbt_utils.bigquery__hash": {"unique_id": "macro.dbt_utils.bigquery__hash", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/hash.sql", "original_file_path": "macros/cross_db_utils/hash.sql", "name": "bigquery__hash", "macro_sql": "{% macro bigquery__hash(field) -%}\n to_hex({{dbt_utils.default__hash(field)}})\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__hash"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.310752}, "macro.dbt_utils.cast_bool_to_text": {"unique_id": "macro.dbt_utils.cast_bool_to_text", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/cast_bool_to_text.sql", "original_file_path": "macros/cross_db_utils/cast_bool_to_text.sql", "name": "cast_bool_to_text", "macro_sql": "{% macro cast_bool_to_text(field) %}\n {{ adapter.dispatch('cast_bool_to_text', 'dbt_utils') (field) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__cast_bool_to_text"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.311119}, "macro.dbt_utils.default__cast_bool_to_text": {"unique_id": "macro.dbt_utils.default__cast_bool_to_text", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/cast_bool_to_text.sql", "original_file_path": "macros/cross_db_utils/cast_bool_to_text.sql", "name": "default__cast_bool_to_text", "macro_sql": "{% macro default__cast_bool_to_text(field) %}\n cast({{ field }} as {{ dbt_utils.type_string() }})\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.type_string"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.311253}, "macro.dbt_utils.redshift__cast_bool_to_text": {"unique_id": "macro.dbt_utils.redshift__cast_bool_to_text", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/cast_bool_to_text.sql", "original_file_path": "macros/cross_db_utils/cast_bool_to_text.sql", "name": "redshift__cast_bool_to_text", "macro_sql": "{% macro redshift__cast_bool_to_text(field) %}\n case\n when {{ field }} is true then 'true'\n when {{ field }} is false then 'false'\n end::text\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.31137}, "macro.dbt_utils.identifier": {"unique_id": "macro.dbt_utils.identifier", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/identifier.sql", "original_file_path": "macros/cross_db_utils/identifier.sql", "name": "identifier", "macro_sql": "{% macro identifier(value) %}\t\n {%- set error_message = '\n Warning: the `identifier` macro is no longer supported and will be deprecated in a future release of dbt-utils. \\\n Use `adapter.quote` instead. The {}.{} model triggered this warning. \\\n '.format(model.package_name, model.name) -%}\n {%- do exceptions.warn(error_message) -%}\n {{ return(adapter.dispatch('identifier', 'dbt_utils') (value)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__identifier"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.3118908}, "macro.dbt_utils.default__identifier": {"unique_id": "macro.dbt_utils.default__identifier", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/identifier.sql", "original_file_path": "macros/cross_db_utils/identifier.sql", "name": "default__identifier", "macro_sql": "{% macro default__identifier(value) -%}\t\n \"{{ value }}\"\t\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.311994}, "macro.dbt_utils.bigquery__identifier": {"unique_id": "macro.dbt_utils.bigquery__identifier", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/identifier.sql", "original_file_path": "macros/cross_db_utils/identifier.sql", "name": "bigquery__identifier", "macro_sql": "{% macro bigquery__identifier(value) -%}\t\n `{{ value }}`\t\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.312088}, "macro.dbt_utils.any_value": {"unique_id": "macro.dbt_utils.any_value", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/any_value.sql", "original_file_path": "macros/cross_db_utils/any_value.sql", "name": "any_value", "macro_sql": "{% macro any_value(expression) -%}\n {{ return(adapter.dispatch('any_value', 'dbt_utils') (expression)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.postgres__any_value"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.312432}, "macro.dbt_utils.default__any_value": {"unique_id": "macro.dbt_utils.default__any_value", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/any_value.sql", "original_file_path": "macros/cross_db_utils/any_value.sql", "name": "default__any_value", "macro_sql": "{% macro default__any_value(expression) -%}\n \n any_value({{ expression }})\n \n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.312534}, "macro.dbt_utils.postgres__any_value": {"unique_id": "macro.dbt_utils.postgres__any_value", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/any_value.sql", "original_file_path": "macros/cross_db_utils/any_value.sql", "name": "postgres__any_value", "macro_sql": "{% macro postgres__any_value(expression) -%}\n {#- /*Postgres doesn't support any_value, so we're using min() to get the same result*/ -#}\n min({{ expression }})\n \n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.312635}, "macro.dbt_utils.position": {"unique_id": "macro.dbt_utils.position", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/position.sql", "original_file_path": "macros/cross_db_utils/position.sql", "name": "position", "macro_sql": "{% macro position(substring_text, string_text) -%}\n {{ return(adapter.dispatch('position', 'dbt_utils') (substring_text, string_text)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__position"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.313069}, "macro.dbt_utils.default__position": {"unique_id": "macro.dbt_utils.default__position", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/position.sql", "original_file_path": "macros/cross_db_utils/position.sql", "name": "default__position", "macro_sql": "{% macro default__position(substring_text, string_text) %}\n\n position(\n {{ substring_text }} in {{ string_text }}\n )\n \n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.313198}, "macro.dbt_utils.bigquery__position": {"unique_id": "macro.dbt_utils.bigquery__position", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/position.sql", "original_file_path": "macros/cross_db_utils/position.sql", "name": "bigquery__position", "macro_sql": "{% macro bigquery__position(substring_text, string_text) %}\n\n strpos(\n {{ string_text }},\n {{ substring_text }}\n \n )\n \n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.313328}, "macro.dbt_utils.string_literal": {"unique_id": "macro.dbt_utils.string_literal", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/literal.sql", "original_file_path": "macros/cross_db_utils/literal.sql", "name": "string_literal", "macro_sql": "{%- macro string_literal(value) -%}\n {{ return(adapter.dispatch('string_literal', 'dbt_utils') (value)) }}\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__string_literal"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.313857}, "macro.dbt_utils.default__string_literal": {"unique_id": "macro.dbt_utils.default__string_literal", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/literal.sql", "original_file_path": "macros/cross_db_utils/literal.sql", "name": "default__string_literal", "macro_sql": "{% macro default__string_literal(value) -%}\n '{{ value }}'\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.313958}, "macro.dbt_utils.current_timestamp": {"unique_id": "macro.dbt_utils.current_timestamp", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/current_timestamp.sql", "original_file_path": "macros/cross_db_utils/current_timestamp.sql", "name": "current_timestamp", "macro_sql": "{% macro current_timestamp() -%}\n {{ return(adapter.dispatch('current_timestamp', 'dbt_utils')()) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__current_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.314527}, "macro.dbt_utils.default__current_timestamp": {"unique_id": "macro.dbt_utils.default__current_timestamp", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/current_timestamp.sql", "original_file_path": "macros/cross_db_utils/current_timestamp.sql", "name": "default__current_timestamp", "macro_sql": "{% macro default__current_timestamp() %}\n current_timestamp::{{dbt_utils.type_timestamp()}}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.type_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.314635}, "macro.dbt_utils.redshift__current_timestamp": {"unique_id": "macro.dbt_utils.redshift__current_timestamp", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/current_timestamp.sql", "original_file_path": "macros/cross_db_utils/current_timestamp.sql", "name": "redshift__current_timestamp", "macro_sql": "{% macro redshift__current_timestamp() %}\n getdate()\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.314702}, "macro.dbt_utils.bigquery__current_timestamp": {"unique_id": "macro.dbt_utils.bigquery__current_timestamp", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/current_timestamp.sql", "original_file_path": "macros/cross_db_utils/current_timestamp.sql", "name": "bigquery__current_timestamp", "macro_sql": "{% macro bigquery__current_timestamp() %}\n current_timestamp\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.314772}, "macro.dbt_utils.current_timestamp_in_utc": {"unique_id": "macro.dbt_utils.current_timestamp_in_utc", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/current_timestamp.sql", "original_file_path": "macros/cross_db_utils/current_timestamp.sql", "name": "current_timestamp_in_utc", "macro_sql": "{% macro current_timestamp_in_utc() -%}\n {{ return(adapter.dispatch('current_timestamp_in_utc', 'dbt_utils')()) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.postgres__current_timestamp_in_utc"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.314969}, "macro.dbt_utils.default__current_timestamp_in_utc": {"unique_id": "macro.dbt_utils.default__current_timestamp_in_utc", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/current_timestamp.sql", "original_file_path": "macros/cross_db_utils/current_timestamp.sql", "name": "default__current_timestamp_in_utc", "macro_sql": "{% macro default__current_timestamp_in_utc() %}\n {{dbt_utils.current_timestamp()}}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.current_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.3152168}, "macro.dbt_utils.snowflake__current_timestamp_in_utc": {"unique_id": "macro.dbt_utils.snowflake__current_timestamp_in_utc", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/current_timestamp.sql", "original_file_path": "macros/cross_db_utils/current_timestamp.sql", "name": "snowflake__current_timestamp_in_utc", "macro_sql": "{% macro snowflake__current_timestamp_in_utc() %}\n convert_timezone('UTC', {{dbt_utils.current_timestamp()}})::{{dbt_utils.type_timestamp()}}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.current_timestamp", "macro.dbt_utils.type_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.315389}, "macro.dbt_utils.postgres__current_timestamp_in_utc": {"unique_id": "macro.dbt_utils.postgres__current_timestamp_in_utc", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/current_timestamp.sql", "original_file_path": "macros/cross_db_utils/current_timestamp.sql", "name": "postgres__current_timestamp_in_utc", "macro_sql": "{% macro postgres__current_timestamp_in_utc() %}\n (current_timestamp at time zone 'utc')::{{dbt_utils.type_timestamp()}}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.type_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.315517}, "macro.dbt_utils.redshift__current_timestamp_in_utc": {"unique_id": "macro.dbt_utils.redshift__current_timestamp_in_utc", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/current_timestamp.sql", "original_file_path": "macros/cross_db_utils/current_timestamp.sql", "name": "redshift__current_timestamp_in_utc", "macro_sql": "{% macro redshift__current_timestamp_in_utc() %}\n {{ return(dbt_utils.default__current_timestamp_in_utc()) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__current_timestamp_in_utc"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.31567}, "macro.dbt_utils.width_bucket": {"unique_id": "macro.dbt_utils.width_bucket", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/width_bucket.sql", "original_file_path": "macros/cross_db_utils/width_bucket.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__width_bucket"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.317354}, "macro.dbt_utils.default__width_bucket": {"unique_id": "macro.dbt_utils.default__width_bucket", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/width_bucket.sql", "original_file_path": "macros/cross_db_utils/width_bucket.sql", "name": "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_utils.safe_cast(expr, dbt_utils.type_numeric() ) }},\n {{ dbt_utils.safe_cast(bin_size, dbt_utils.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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.safe_cast", "macro.dbt_utils.type_numeric"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.317856}, "macro.dbt_utils.redshift__width_bucket": {"unique_id": "macro.dbt_utils.redshift__width_bucket", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/width_bucket.sql", "original_file_path": "macros/cross_db_utils/width_bucket.sql", "name": "redshift__width_bucket", "macro_sql": "{% macro redshift__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 exactly at the bucket edge\n case\n when\n {{ dbt_utils.safe_cast(expr, dbt_utils.type_numeric() ) }} %\n {{ dbt_utils.safe_cast(bin_size, dbt_utils.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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.safe_cast", "macro.dbt_utils.type_numeric"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.318369}, "macro.dbt_utils.snowflake__width_bucket": {"unique_id": "macro.dbt_utils.snowflake__width_bucket", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/width_bucket.sql", "original_file_path": "macros/cross_db_utils/width_bucket.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.318576}, "macro.dbt_utils.array_concat": {"unique_id": "macro.dbt_utils.array_concat", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/array_concat.sql", "original_file_path": "macros/cross_db_utils/array_concat.sql", "name": "array_concat", "macro_sql": "{% macro array_concat(array_1, array_2) -%}\n {{ return(adapter.dispatch('array_concat', 'dbt_utils')(array_1, array_2)) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__array_concat"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.319198}, "macro.dbt_utils.default__array_concat": {"unique_id": "macro.dbt_utils.default__array_concat", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/array_concat.sql", "original_file_path": "macros/cross_db_utils/array_concat.sql", "name": "default__array_concat", "macro_sql": "{% macro default__array_concat(array_1, array_2) -%}\n array_cat({{ array_1 }}, {{ array_2 }})\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.319367}, "macro.dbt_utils.bigquery__array_concat": {"unique_id": "macro.dbt_utils.bigquery__array_concat", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/array_concat.sql", "original_file_path": "macros/cross_db_utils/array_concat.sql", "name": "bigquery__array_concat", "macro_sql": "{% macro bigquery__array_concat(array_1, array_2) -%}\n array_concat({{ array_1 }}, {{ array_2 }})\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.319516}, "macro.dbt_utils.redshift__array_concat": {"unique_id": "macro.dbt_utils.redshift__array_concat", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/array_concat.sql", "original_file_path": "macros/cross_db_utils/array_concat.sql", "name": "redshift__array_concat", "macro_sql": "{% macro redshift__array_concat(array_1, array_2) -%}\n array_concat({{ array_1 }}, {{ array_2 }})\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.319656}, "macro.dbt_utils.bool_or": {"unique_id": "macro.dbt_utils.bool_or", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/bool_or.sql", "original_file_path": "macros/cross_db_utils/bool_or.sql", "name": "bool_or", "macro_sql": "{% macro bool_or(expression) -%}\n {{ return(adapter.dispatch('bool_or', 'dbt_utils') (expression)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__bool_or"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.32017}, "macro.dbt_utils.default__bool_or": {"unique_id": "macro.dbt_utils.default__bool_or", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/bool_or.sql", "original_file_path": "macros/cross_db_utils/bool_or.sql", "name": "default__bool_or", "macro_sql": "{% macro default__bool_or(expression) -%}\n \n bool_or({{ expression }})\n \n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.3202848}, "macro.dbt_utils.snowflake__bool_or": {"unique_id": "macro.dbt_utils.snowflake__bool_or", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/bool_or.sql", "original_file_path": "macros/cross_db_utils/bool_or.sql", "name": "snowflake__bool_or", "macro_sql": "{% macro snowflake__bool_or(expression) -%}\n \n boolor_agg({{ expression }})\n \n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.3454988}, "macro.dbt_utils.bigquery__bool_or": {"unique_id": "macro.dbt_utils.bigquery__bool_or", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/bool_or.sql", "original_file_path": "macros/cross_db_utils/bool_or.sql", "name": "bigquery__bool_or", "macro_sql": "{% macro bigquery__bool_or(expression) -%}\n \n logical_or({{ expression }})\n \n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.345653}, "macro.dbt_utils.last_day": {"unique_id": "macro.dbt_utils.last_day", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/last_day.sql", "original_file_path": "macros/cross_db_utils/last_day.sql", "name": "last_day", "macro_sql": "{% macro last_day(date, datepart) %}\n {{ return(adapter.dispatch('last_day', 'dbt_utils') (date, datepart)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.postgres__last_day"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.346477}, "macro.dbt_utils.default_last_day": {"unique_id": "macro.dbt_utils.default_last_day", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/last_day.sql", "original_file_path": "macros/cross_db_utils/last_day.sql", "name": "default_last_day", "macro_sql": "\n\n\n{%- macro default_last_day(date, datepart) -%}\n cast(\n {{dbt_utils.dateadd('day', '-1',\n dbt_utils.dateadd(datepart, '1', dbt_utils.date_trunc(datepart, date))\n )}}\n as date)\n{%- endmacro -%}\n\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.dateadd", "macro.dbt_utils.date_trunc"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.3467689}, "macro.dbt_utils.default__last_day": {"unique_id": "macro.dbt_utils.default__last_day", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/last_day.sql", "original_file_path": "macros/cross_db_utils/last_day.sql", "name": "default__last_day", "macro_sql": "{% macro default__last_day(date, datepart) -%}\n {{dbt_utils.default_last_day(date, datepart)}}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default_last_day"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.346932}, "macro.dbt_utils.postgres__last_day": {"unique_id": "macro.dbt_utils.postgres__last_day", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/last_day.sql", "original_file_path": "macros/cross_db_utils/last_day.sql", "name": "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_utils.dateadd('day', '-1',\n dbt_utils.dateadd('month', '3', dbt_utils.date_trunc(datepart, date))\n )}}\n as date)\n {%- else -%}\n {{dbt_utils.default_last_day(date, datepart)}}\n {%- endif -%}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.dateadd", "macro.dbt_utils.date_trunc", "macro.dbt_utils.default_last_day"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.347353}, "macro.dbt_utils.redshift__last_day": {"unique_id": "macro.dbt_utils.redshift__last_day", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/last_day.sql", "original_file_path": "macros/cross_db_utils/last_day.sql", "name": "redshift__last_day", "macro_sql": "{% macro redshift__last_day(date, datepart) %}\n\n {{ return(dbt_utils.default__last_day(date, datepart)) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__last_day"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.347542}, "macro.dbt_utils.split_part": {"unique_id": "macro.dbt_utils.split_part", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/split_part.sql", "original_file_path": "macros/cross_db_utils/split_part.sql", "name": "split_part", "macro_sql": "{% macro split_part(string_text, delimiter_text, part_number) %}\n {{ return(adapter.dispatch('split_part', 'dbt_utils') (string_text, delimiter_text, part_number)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.postgres__split_part"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.3491042}, "macro.dbt_utils.default__split_part": {"unique_id": "macro.dbt_utils.default__split_part", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/split_part.sql", "original_file_path": "macros/cross_db_utils/split_part.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.349269}, "macro.dbt_utils._split_part_negative": {"unique_id": "macro.dbt_utils._split_part_negative", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/split_part.sql", "original_file_path": "macros/cross_db_utils/split_part.sql", "name": "_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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.349493}, "macro.dbt_utils.postgres__split_part": {"unique_id": "macro.dbt_utils.postgres__split_part", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/split_part.sql", "original_file_path": "macros/cross_db_utils/split_part.sql", "name": "postgres__split_part", "macro_sql": "{% macro postgres__split_part(string_text, delimiter_text, part_number) %}\n\n {% if part_number >= 0 %}\n {{ dbt_utils.default__split_part(string_text, delimiter_text, part_number) }}\n {% else %}\n {{ dbt_utils._split_part_negative(string_text, delimiter_text, part_number) }}\n {% endif %}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__split_part", "macro.dbt_utils._split_part_negative"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.349835}, "macro.dbt_utils.redshift__split_part": {"unique_id": "macro.dbt_utils.redshift__split_part", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/split_part.sql", "original_file_path": "macros/cross_db_utils/split_part.sql", "name": "redshift__split_part", "macro_sql": "{% macro redshift__split_part(string_text, delimiter_text, part_number) %}\n\n {% if part_number >= 0 %}\n {{ dbt_utils.default__split_part(string_text, delimiter_text, part_number) }}\n {% else %}\n {{ dbt_utils._split_part_negative(string_text, delimiter_text, part_number) }}\n {% endif %}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__split_part", "macro.dbt_utils._split_part_negative"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.350278}, "macro.dbt_utils.bigquery__split_part": {"unique_id": "macro.dbt_utils.bigquery__split_part", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/split_part.sql", "original_file_path": "macros/cross_db_utils/split_part.sql", "name": "bigquery__split_part", "macro_sql": "{% macro bigquery__split_part(string_text, delimiter_text, part_number) %}\n\n {% if part_number >= 0 %}\n split(\n {{ string_text }},\n {{ delimiter_text }}\n )[safe_offset({{ part_number - 1 }})]\n {% else %}\n split(\n {{ string_text }},\n {{ delimiter_text }}\n )[safe_offset(\n length({{ string_text }}) \n - length(\n replace({{ string_text }}, {{ delimiter_text }}, '')\n ) + 1\n )]\n {% endif %}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.350699}, "macro.dbt_utils.date_trunc": {"unique_id": "macro.dbt_utils.date_trunc", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/date_trunc.sql", "original_file_path": "macros/cross_db_utils/date_trunc.sql", "name": "date_trunc", "macro_sql": "{% macro date_trunc(datepart, date) -%}\n {{ return(adapter.dispatch('date_trunc', 'dbt_utils') (datepart, date)) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__date_trunc"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.3512309}, "macro.dbt_utils.default__date_trunc": {"unique_id": "macro.dbt_utils.default__date_trunc", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/date_trunc.sql", "original_file_path": "macros/cross_db_utils/date_trunc.sql", "name": "default__date_trunc", "macro_sql": "{% macro default__date_trunc(datepart, date) -%}\n date_trunc('{{datepart}}', {{date}})\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.3513641}, "macro.dbt_utils.bigquery__date_trunc": {"unique_id": "macro.dbt_utils.bigquery__date_trunc", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/date_trunc.sql", "original_file_path": "macros/cross_db_utils/date_trunc.sql", "name": "bigquery__date_trunc", "macro_sql": "{% macro bigquery__date_trunc(datepart, date) -%}\n timestamp_trunc(\n cast({{date}} as timestamp),\n {{datepart}}\n )\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.351495}, "macro.dbt_utils.array_construct": {"unique_id": "macro.dbt_utils.array_construct", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/array_construct.sql", "original_file_path": "macros/cross_db_utils/array_construct.sql", "name": "array_construct", "macro_sql": "{% macro array_construct(inputs = [], data_type = api.Column.translate_type('integer')) -%}\n {{ return(adapter.dispatch('array_construct', 'dbt_utils')(inputs, data_type)) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__array_construct"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.3521652}, "macro.dbt_utils.default__array_construct": {"unique_id": "macro.dbt_utils.default__array_construct", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/array_construct.sql", "original_file_path": "macros/cross_db_utils/array_construct.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.352423}, "macro.dbt_utils.snowflake__array_construct": {"unique_id": "macro.dbt_utils.snowflake__array_construct", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/array_construct.sql", "original_file_path": "macros/cross_db_utils/array_construct.sql", "name": "snowflake__array_construct", "macro_sql": "{% macro snowflake__array_construct(inputs, data_type) -%}\n array_construct( {{ inputs|join(' , ') }} )\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.352567}, "macro.dbt_utils.redshift__array_construct": {"unique_id": "macro.dbt_utils.redshift__array_construct", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/array_construct.sql", "original_file_path": "macros/cross_db_utils/array_construct.sql", "name": "redshift__array_construct", "macro_sql": "{% macro redshift__array_construct(inputs, data_type) -%}\n array( {{ inputs|join(' , ') }} )\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.352702}, "macro.dbt_utils.bigquery__array_construct": {"unique_id": "macro.dbt_utils.bigquery__array_construct", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/array_construct.sql", "original_file_path": "macros/cross_db_utils/array_construct.sql", "name": "bigquery__array_construct", "macro_sql": "{% macro bigquery__array_construct(inputs, data_type) -%}\n [ {{ inputs|join(' , ') }} ]\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.352837}, "macro.dbt_utils._is_ephemeral": {"unique_id": "macro.dbt_utils._is_ephemeral", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/_is_ephemeral.sql", "original_file_path": "macros/cross_db_utils/_is_ephemeral.sql", "name": "_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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.353759}, "macro.dbt_utils.array_append": {"unique_id": "macro.dbt_utils.array_append", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/array_append.sql", "original_file_path": "macros/cross_db_utils/array_append.sql", "name": "array_append", "macro_sql": "{% macro array_append(array, new_element) -%}\n {{ return(adapter.dispatch('array_append', 'dbt_utils')(array, new_element)) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__array_append"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.3542268}, "macro.dbt_utils.default__array_append": {"unique_id": "macro.dbt_utils.default__array_append", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/array_append.sql", "original_file_path": "macros/cross_db_utils/array_append.sql", "name": "default__array_append", "macro_sql": "{% macro default__array_append(array, new_element) -%}\n array_append({{ array }}, {{ new_element }})\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.354362}, "macro.dbt_utils.bigquery__array_append": {"unique_id": "macro.dbt_utils.bigquery__array_append", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/array_append.sql", "original_file_path": "macros/cross_db_utils/array_append.sql", "name": "bigquery__array_append", "macro_sql": "{% macro bigquery__array_append(array, new_element) -%}\n {{ dbt_utils.array_concat(array, dbt_utils.array_construct([new_element])) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.array_concat", "macro.dbt_utils.array_construct"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.354561}, "macro.dbt_utils.redshift__array_append": {"unique_id": "macro.dbt_utils.redshift__array_append", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/array_append.sql", "original_file_path": "macros/cross_db_utils/array_append.sql", "name": "redshift__array_append", "macro_sql": "{% macro redshift__array_append(array, new_element) -%}\n {{ dbt_utils.array_concat(array, dbt_utils.array_construct([new_element])) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.array_concat", "macro.dbt_utils.array_construct"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.354749}, "macro.dbt_utils.get_period_boundaries": {"unique_id": "macro.dbt_utils.get_period_boundaries", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/materializations/insert_by_period_materialization.sql", "original_file_path": "macros/materializations/insert_by_period_materialization.sql", "name": "get_period_boundaries", "macro_sql": "{% macro get_period_boundaries(target_schema, target_table, timestamp_field, start_date, stop_date, period) -%}\n {{ return(adapter.dispatch('get_period_boundaries', 'dbt_utils')(target_schema, target_table, timestamp_field, start_date, stop_date, period)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__get_period_boundaries"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.360798}, "macro.dbt_utils.default__get_period_boundaries": {"unique_id": "macro.dbt_utils.default__get_period_boundaries", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/materializations/insert_by_period_materialization.sql", "original_file_path": "macros/materializations/insert_by_period_materialization.sql", "name": "default__get_period_boundaries", "macro_sql": "{% macro default__get_period_boundaries(target_schema, target_table, timestamp_field, start_date, stop_date, period) -%}\n\n {% call statement('period_boundaries', fetch_result=True) -%}\n with data as (\n select\n coalesce(max(\"{{timestamp_field}}\"), '{{start_date}}')::timestamp as start_timestamp,\n coalesce(\n {{dbt_utils.dateadd('millisecond',\n -1,\n \"nullif('\" ~ stop_date ~ \"','')::timestamp\")}},\n {{dbt_utils.current_timestamp()}}\n ) as stop_timestamp\n from \"{{target_schema}}\".\"{{target_table}}\"\n )\n\n select\n start_timestamp,\n stop_timestamp,\n {{dbt_utils.datediff('start_timestamp',\n 'stop_timestamp',\n period)}} + 1 as num_periods\n from data\n {%- endcall %}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement", "macro.dbt_utils.dateadd", "macro.dbt_utils.current_timestamp", "macro.dbt_utils.datediff"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.3613691}, "macro.dbt_utils.get_period_sql": {"unique_id": "macro.dbt_utils.get_period_sql", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/materializations/insert_by_period_materialization.sql", "original_file_path": "macros/materializations/insert_by_period_materialization.sql", "name": "get_period_sql", "macro_sql": "{% macro get_period_sql(target_cols_csv, sql, timestamp_field, period, start_timestamp, stop_timestamp, offset) -%}\n {{ return(adapter.dispatch('get_period_sql', 'dbt_utils')(target_cols_csv, sql, timestamp_field, period, start_timestamp, stop_timestamp, offset)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__get_period_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.361713}, "macro.dbt_utils.default__get_period_sql": {"unique_id": "macro.dbt_utils.default__get_period_sql", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/materializations/insert_by_period_materialization.sql", "original_file_path": "macros/materializations/insert_by_period_materialization.sql", "name": "default__get_period_sql", "macro_sql": "{% macro default__get_period_sql(target_cols_csv, sql, timestamp_field, period, start_timestamp, stop_timestamp, offset) -%}\n\n {%- set period_filter -%}\n (\"{{timestamp_field}}\" > '{{start_timestamp}}'::timestamp + interval '{{offset}} {{period}}' and\n \"{{timestamp_field}}\" <= '{{start_timestamp}}'::timestamp + interval '{{offset}} {{period}}' + interval '1 {{period}}' and\n \"{{timestamp_field}}\" < '{{stop_timestamp}}'::timestamp)\n {%- endset -%}\n\n {%- set filtered_sql = sql | replace(\"__PERIOD_FILTER__\", period_filter) -%}\n\n select\n {{target_cols_csv}}\n from (\n {{filtered_sql}}\n )\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.362247}, "macro.dbt_utils.materialization_insert_by_period_default": {"unique_id": "macro.dbt_utils.materialization_insert_by_period_default", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/materializations/insert_by_period_materialization.sql", "original_file_path": "macros/materializations/insert_by_period_materialization.sql", "name": "materialization_insert_by_period_default", "macro_sql": "{% materialization insert_by_period, default -%}\n {%- set timestamp_field = config.require('timestamp_field') -%}\n {%- set start_date = config.require('start_date') -%}\n {%- set stop_date = config.get('stop_date') or '' -%}\n {%- set period = config.get('period') or 'week' -%}\n\n {%- if sql.find('__PERIOD_FILTER__') == -1 -%}\n {%- set error_message -%}\n Model '{{ model.unique_id }}' does not include the required string '__PERIOD_FILTER__' in its sql\n {%- endset -%}\n {{ exceptions.raise_compiler_error(error_message) }}\n {%- endif -%}\n\n {%- set identifier = model['name'] -%}\n\n {%- set old_relation = adapter.get_relation(database=database, schema=schema, identifier=identifier) -%}\n {%- set target_relation = api.Relation.create(identifier=identifier, schema=schema, type='table') -%}\n\n {%- set non_destructive_mode = (flags.NON_DESTRUCTIVE == True) -%}\n {%- set full_refresh_mode = (flags.FULL_REFRESH == True) -%}\n\n {%- set exists_as_table = (old_relation is not none and old_relation.is_table) -%}\n {%- set exists_not_as_table = (old_relation is not none and not old_relation.is_table) -%}\n\n {%- set should_truncate = (non_destructive_mode and full_refresh_mode and exists_as_table) -%}\n {%- set should_drop = (not should_truncate and (full_refresh_mode or exists_not_as_table)) -%}\n {%- set force_create = (flags.FULL_REFRESH and not flags.NON_DESTRUCTIVE) -%}\n\n -- setup\n {% if old_relation is none -%}\n -- noop\n {%- elif should_truncate -%}\n {{adapter.truncate_relation(old_relation)}}\n {%- elif should_drop -%}\n {{adapter.drop_relation(old_relation)}}\n {%- set old_relation = none -%}\n {%- endif %}\n\n {{run_hooks(pre_hooks, inside_transaction=False)}}\n\n -- `begin` happens here, so `commit` after it to finish the transaction\n {{run_hooks(pre_hooks, inside_transaction=True)}}\n {% call statement() -%}\n begin; -- make extra sure we've closed out the transaction\n commit;\n {%- endcall %}\n\n -- build model\n {% if force_create or old_relation is none -%}\n {# Create an empty target table -#}\n {% call statement('main') -%}\n {%- set empty_sql = sql | replace(\"__PERIOD_FILTER__\", 'false') -%}\n {{create_table_as(False, target_relation, empty_sql)}}\n {%- endcall %}\n {%- endif %}\n\n {% set _ = dbt_utils.get_period_boundaries(schema,\n identifier,\n timestamp_field,\n start_date,\n stop_date,\n period) %}\n {%- set start_timestamp = load_result('period_boundaries')['data'][0][0] | string -%}\n {%- set stop_timestamp = load_result('period_boundaries')['data'][0][1] | string -%}\n {%- set num_periods = load_result('period_boundaries')['data'][0][2] | int -%}\n\n {% set target_columns = adapter.get_columns_in_relation(target_relation) %}\n {%- set target_cols_csv = target_columns | map(attribute='quoted') | join(', ') -%}\n {%- set loop_vars = {'sum_rows_inserted': 0} -%}\n\n -- commit each period as a separate transaction\n {% for i in range(num_periods) -%}\n {%- set msg = \"Running for \" ~ period ~ \" \" ~ (i + 1) ~ \" of \" ~ (num_periods) -%}\n {{ dbt_utils.log_info(msg) }}\n\n {%- set tmp_identifier = model['name'] ~ '__dbt_incremental_period' ~ i ~ '_tmp' -%}\n {%- set tmp_relation = api.Relation.create(identifier=tmp_identifier,\n schema=schema, type='table') -%}\n {% call statement() -%}\n {% set tmp_table_sql = dbt_utils.get_period_sql(target_cols_csv,\n sql,\n timestamp_field,\n period,\n start_timestamp,\n stop_timestamp,\n i) %}\n {{dbt.create_table_as(True, tmp_relation, tmp_table_sql)}}\n {%- endcall %}\n\n {{adapter.expand_target_column_types(from_relation=tmp_relation,\n to_relation=target_relation)}}\n {%- set name = 'main-' ~ i -%}\n {% call statement(name, fetch_result=True) -%}\n insert into {{target_relation}} ({{target_cols_csv}})\n (\n select\n {{target_cols_csv}}\n from {{tmp_relation.include(schema=False)}}\n );\n {%- endcall %}\n {% set result = load_result('main-' ~ i) %}\n {% if 'response' in result.keys() %} {# added in v0.19.0 #}\n {% set rows_inserted = result['response']['rows_affected'] %}\n {% else %} {# older versions #}\n {% set rows_inserted = result['status'].split(\" \")[2] | int %}\n {% endif %}\n \n {%- set sum_rows_inserted = loop_vars['sum_rows_inserted'] + rows_inserted -%}\n {%- if loop_vars.update({'sum_rows_inserted': sum_rows_inserted}) %} {% endif -%}\n\n {%- set msg = \"Ran for \" ~ period ~ \" \" ~ (i + 1) ~ \" of \" ~ (num_periods) ~ \"; \" ~ rows_inserted ~ \" records inserted\" -%}\n {{ dbt_utils.log_info(msg) }}\n\n {%- endfor %}\n\n {% call statement() -%}\n begin;\n {%- endcall %}\n\n {{run_hooks(post_hooks, inside_transaction=True)}}\n\n {% call statement() -%}\n commit;\n {%- endcall %}\n\n {{run_hooks(post_hooks, inside_transaction=False)}}\n\n {%- set status_string = \"INSERT \" ~ loop_vars['sum_rows_inserted'] -%}\n\n {% call noop_statement('main', status_string) -%}\n -- no-op\n {%- endcall %}\n\n -- Return the relations created in this materialization\n {{ return({'relations': [target_relation]}) }} \n\n{%- endmaterialization %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.run_hooks", "macro.dbt.statement", "macro.dbt.create_table_as", "macro.dbt_utils.get_period_boundaries", "macro.dbt_utils.log_info", "macro.dbt_utils.get_period_sql", "macro.dbt.noop_statement"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.367767}, "macro.dbt_utils.get_url_host": {"unique_id": "macro.dbt_utils.get_url_host", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/web/get_url_host.sql", "original_file_path": "macros/web/get_url_host.sql", "name": "get_url_host", "macro_sql": "{% macro get_url_host(field) -%}\n {{ return(adapter.dispatch('get_url_host', 'dbt_utils')(field)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__get_url_host"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.3685608}, "macro.dbt_utils.default__get_url_host": {"unique_id": "macro.dbt_utils.default__get_url_host", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/web/get_url_host.sql", "original_file_path": "macros/web/get_url_host.sql", "name": "default__get_url_host", "macro_sql": "{% macro default__get_url_host(field) -%}\n\n{%- set parsed =\n dbt_utils.split_part(\n dbt_utils.split_part(\n dbt_utils.replace(\n dbt_utils.replace(\n dbt_utils.replace(field, \"'android-app://'\", \"''\"\n ), \"'http://'\", \"''\"\n ), \"'https://'\", \"''\"\n ), \"'/'\", 1\n ), \"'?'\", 1\n )\n\n-%}\n\n\n {{ dbt_utils.safe_cast(\n parsed,\n dbt_utils.type_string()\n )}}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.split_part", "macro.dbt_utils.replace", "macro.dbt_utils.safe_cast", "macro.dbt_utils.type_string"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.369098}, "macro.dbt_utils.get_url_path": {"unique_id": "macro.dbt_utils.get_url_path", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/web/get_url_path.sql", "original_file_path": "macros/web/get_url_path.sql", "name": "get_url_path", "macro_sql": "{% macro get_url_path(field) -%}\n {{ return(adapter.dispatch('get_url_path', 'dbt_utils')(field)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__get_url_path"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.369808}, "macro.dbt_utils.default__get_url_path": {"unique_id": "macro.dbt_utils.default__get_url_path", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/web/get_url_path.sql", "original_file_path": "macros/web/get_url_path.sql", "name": "default__get_url_path", "macro_sql": "{% macro default__get_url_path(field) -%}\n\n {%- set stripped_url = \n dbt_utils.replace(\n dbt_utils.replace(field, \"'http://'\", \"''\"), \"'https://'\", \"''\")\n -%}\n\n {%- set first_slash_pos -%}\n coalesce(\n nullif({{dbt_utils.position(\"'/'\", stripped_url)}}, 0),\n {{dbt_utils.position(\"'?'\", stripped_url)}} - 1\n )\n {%- endset -%}\n\n {%- set parsed_path =\n dbt_utils.split_part(\n dbt_utils.right(\n stripped_url, \n dbt_utils.length(stripped_url) ~ \"-\" ~ first_slash_pos\n ), \n \"'?'\", 1\n )\n -%}\n\n {{ dbt_utils.safe_cast(\n parsed_path,\n dbt_utils.type_string()\n )}}\n \n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.replace", "macro.dbt_utils.position", "macro.dbt_utils.split_part", "macro.dbt_utils.right", "macro.dbt_utils.length", "macro.dbt_utils.safe_cast", "macro.dbt_utils.type_string"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.37051}, "macro.dbt_utils.get_url_parameter": {"unique_id": "macro.dbt_utils.get_url_parameter", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/web/get_url_parameter.sql", "original_file_path": "macros/web/get_url_parameter.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__get_url_parameter"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.372663}, "macro.dbt_utils.default__get_url_parameter": {"unique_id": "macro.dbt_utils.default__get_url_parameter", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/web/get_url_parameter.sql", "original_file_path": "macros/web/get_url_parameter.sql", "name": "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_utils.split_part(dbt_utils.split_part(field, formatted_url_parameter, 2), \"'&'\", 1) -%}\n\nnullif({{ split }},'')\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.split_part"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.373069}, "macro.dbt_utils.test_fewer_rows_than": {"unique_id": "macro.dbt_utils.test_fewer_rows_than", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/fewer_rows_than.sql", "original_file_path": "macros/generic_tests/fewer_rows_than.sql", "name": "test_fewer_rows_than", "macro_sql": "{% test fewer_rows_than(model, compare_model) %}\n {{ return(adapter.dispatch('test_fewer_rows_than', 'dbt_utils')(model, compare_model)) }}\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_fewer_rows_than"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.373767}, "macro.dbt_utils.default__test_fewer_rows_than": {"unique_id": "macro.dbt_utils.default__test_fewer_rows_than", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/fewer_rows_than.sql", "original_file_path": "macros/generic_tests/fewer_rows_than.sql", "name": "default__test_fewer_rows_than", "macro_sql": "{% macro default__test_fewer_rows_than(model, compare_model) %}\n\n{{ config(fail_calc = 'coalesce(row_count_delta, 0)') }}\n\nwith a as (\n\n select count(*) as count_our_model from {{ model }}\n\n),\nb as (\n\n select count(*) as count_comparison_model from {{ compare_model }}\n\n),\ncounts as (\n\n select\n count_our_model,\n count_comparison_model\n from a\n cross join b\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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.3740249}, "macro.dbt_utils.test_equal_rowcount": {"unique_id": "macro.dbt_utils.test_equal_rowcount", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/equal_rowcount.sql", "original_file_path": "macros/generic_tests/equal_rowcount.sql", "name": "test_equal_rowcount", "macro_sql": "{% test equal_rowcount(model, compare_model) %}\n {{ return(adapter.dispatch('test_equal_rowcount', 'dbt_utils')(model, compare_model)) }}\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_equal_rowcount"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.374541}, "macro.dbt_utils.default__test_equal_rowcount": {"unique_id": "macro.dbt_utils.default__test_equal_rowcount", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/equal_rowcount.sql", "original_file_path": "macros/generic_tests/equal_rowcount.sql", "name": "default__test_equal_rowcount", "macro_sql": "{% macro default__test_equal_rowcount(model, compare_model) %}\n\n{#-- Needs to be set at parse time, before we return '' below --#}\n{{ config(fail_calc = '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\nwith a as (\n\n select count(*) as count_a from {{ model }}\n\n),\nb as (\n\n select count(*) as count_b from {{ compare_model }}\n\n),\nfinal as (\n\n select\n count_a,\n count_b,\n abs(count_a - count_b) as diff_count\n from a\n cross join b\n\n)\n\nselect * from final\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.374867}, "macro.dbt_utils.test_relationships_where": {"unique_id": "macro.dbt_utils.test_relationships_where", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/relationships_where.sql", "original_file_path": "macros/generic_tests/relationships_where.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_relationships_where"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.375628}, "macro.dbt_utils.default__test_relationships_where": {"unique_id": "macro.dbt_utils.default__test_relationships_where", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/relationships_where.sql", "original_file_path": "macros/generic_tests/relationships_where.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.376587}, "macro.dbt_utils.test_recency": {"unique_id": "macro.dbt_utils.test_recency", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/recency.sql", "original_file_path": "macros/generic_tests/recency.sql", "name": "test_recency", "macro_sql": "{% test recency(model, field, datepart, interval) %}\n {{ return(adapter.dispatch('test_recency', 'dbt_utils')(model, field, datepart, interval)) }}\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_recency"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.377256}, "macro.dbt_utils.default__test_recency": {"unique_id": "macro.dbt_utils.default__test_recency", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/recency.sql", "original_file_path": "macros/generic_tests/recency.sql", "name": "default__test_recency", "macro_sql": "{% macro default__test_recency(model, field, datepart, interval) %}\n\n{% set threshold = dbt_utils.dateadd(datepart, interval * -1, dbt_utils.current_timestamp()) %}\n\nwith recency as (\n\n select max({{field}}) as most_recent\n from {{ model }}\n\n)\n\nselect\n\n most_recent,\n {{ threshold }} as threshold\n\nfrom recency\nwhere most_recent < {{ threshold }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.dateadd", "macro.dbt_utils.current_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.377645}, "macro.dbt_utils.test_not_constant": {"unique_id": "macro.dbt_utils.test_not_constant", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/not_constant.sql", "original_file_path": "macros/generic_tests/not_constant.sql", "name": "test_not_constant", "macro_sql": "{% test not_constant(model, column_name) %}\n {{ return(adapter.dispatch('test_not_constant', 'dbt_utils')(model, column_name)) }}\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_not_constant"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.378753}, "macro.dbt_utils.default__test_not_constant": {"unique_id": "macro.dbt_utils.default__test_not_constant", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/not_constant.sql", "original_file_path": "macros/generic_tests/not_constant.sql", "name": "default__test_not_constant", "macro_sql": "{% macro default__test_not_constant(model, column_name) %}\n\n\nselect\n {# In TSQL, subquery aggregate columns need aliases #}\n {# thus: a filler col name, 'filler_column' #}\n count(distinct {{ column_name }}) as filler_column\n\nfrom {{ model }}\n\nhaving count(distinct {{ column_name }}) = 1\n\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.378974}, "macro.dbt_utils.test_accepted_range": {"unique_id": "macro.dbt_utils.test_accepted_range", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/accepted_range.sql", "original_file_path": "macros/generic_tests/accepted_range.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_accepted_range"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.380417}, "macro.dbt_utils.default__test_accepted_range": {"unique_id": "macro.dbt_utils.default__test_accepted_range", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/accepted_range.sql", "original_file_path": "macros/generic_tests/accepted_range.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.381442}, "macro.dbt_utils.test_not_accepted_values": {"unique_id": "macro.dbt_utils.test_not_accepted_values", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/not_accepted_values.sql", "original_file_path": "macros/generic_tests/not_accepted_values.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_not_accepted_values"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.3825128}, "macro.dbt_utils.default__test_not_accepted_values": {"unique_id": "macro.dbt_utils.default__test_not_accepted_values", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/not_accepted_values.sql", "original_file_path": "macros/generic_tests/not_accepted_values.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.3830621}, "macro.dbt_utils.test_unique_where": {"unique_id": "macro.dbt_utils.test_unique_where", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/test_unique_where.sql", "original_file_path": "macros/generic_tests/test_unique_where.sql", "name": "test_unique_where", "macro_sql": "{% test unique_where(model, column_name) %}\r\n {%- set deprecation_warning = '\r\n Warning: `dbt_utils.unique_where` is no longer supported.\r\n Starting in dbt v0.20.0, the built-in `unique` test supports a `where` config.\r\n ' -%}\r\n {%- do exceptions.warn(deprecation_warning) -%}\r\n {{ return(adapter.dispatch('test_unique_where', 'dbt_utils')(model, column_name)) }}\r\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_unique_where"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.385046}, "macro.dbt_utils.default__test_unique_where": {"unique_id": "macro.dbt_utils.default__test_unique_where", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/test_unique_where.sql", "original_file_path": "macros/generic_tests/test_unique_where.sql", "name": "default__test_unique_where", "macro_sql": "{% macro default__test_unique_where(model, column_name) %}\r\n {{ return(test_unique(model, column_name)) }}\r\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.test_unique"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.3853471}, "macro.dbt_utils.test_at_least_one": {"unique_id": "macro.dbt_utils.test_at_least_one", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/at_least_one.sql", "original_file_path": "macros/generic_tests/at_least_one.sql", "name": "test_at_least_one", "macro_sql": "{% test at_least_one(model, column_name) %}\n {{ return(adapter.dispatch('test_at_least_one', 'dbt_utils')(model, column_name)) }}\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_at_least_one"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.3865678}, "macro.dbt_utils.default__test_at_least_one": {"unique_id": "macro.dbt_utils.default__test_at_least_one", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/at_least_one.sql", "original_file_path": "macros/generic_tests/at_least_one.sql", "name": "default__test_at_least_one", "macro_sql": "{% macro default__test_at_least_one(model, column_name) %}\n\nselect *\nfrom (\n select\n {# In TSQL, subquery aggregate columns need aliases #}\n {# thus: a filler col name, 'filler_column' #}\n count({{ column_name }}) as filler_column\n\n from {{ model }}\n\n having count({{ column_name }}) = 0\n\n) validation_errors\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.3868532}, "macro.dbt_utils.test_unique_combination_of_columns": {"unique_id": "macro.dbt_utils.test_unique_combination_of_columns", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/unique_combination_of_columns.sql", "original_file_path": "macros/generic_tests/unique_combination_of_columns.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_unique_combination_of_columns"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.3907251}, "macro.dbt_utils.default__test_unique_combination_of_columns": {"unique_id": "macro.dbt_utils.default__test_unique_combination_of_columns", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/unique_combination_of_columns.sql", "original_file_path": "macros/generic_tests/unique_combination_of_columns.sql", "name": "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 {% set column_list = 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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.391511}, "macro.dbt_utils.test_cardinality_equality": {"unique_id": "macro.dbt_utils.test_cardinality_equality", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/cardinality_equality.sql", "original_file_path": "macros/generic_tests/cardinality_equality.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_cardinality_equality"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.393377}, "macro.dbt_utils.default__test_cardinality_equality": {"unique_id": "macro.dbt_utils.default__test_cardinality_equality", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/cardinality_equality.sql", "original_file_path": "macros/generic_tests/cardinality_equality.sql", "name": "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_utils.except() }}\n select *\n from table_b\n),\n\nexcept_b as (\n select *\n from table_b\n {{ dbt_utils.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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.except"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.3937678}, "macro.dbt_utils.test_expression_is_true": {"unique_id": "macro.dbt_utils.test_expression_is_true", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/expression_is_true.sql", "original_file_path": "macros/generic_tests/expression_is_true.sql", "name": "test_expression_is_true", "macro_sql": "{% test expression_is_true(model, expression, column_name=None, condition='1=1') %}\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 {{ return(adapter.dispatch('test_expression_is_true', 'dbt_utils')(model, expression, column_name, condition)) }}\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_expression_is_true"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.394388}, "macro.dbt_utils.default__test_expression_is_true": {"unique_id": "macro.dbt_utils.default__test_expression_is_true", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/expression_is_true.sql", "original_file_path": "macros/generic_tests/expression_is_true.sql", "name": "default__test_expression_is_true", "macro_sql": "{% macro default__test_expression_is_true(model, expression, column_name, condition) %}\n\nwith meet_condition as (\n select * from {{ model }} where {{ condition }}\n)\n\nselect\n *\nfrom meet_condition\n{% if column_name is none %}\nwhere not({{ expression }})\n{%- else %}\nwhere not({{ column_name }} {{ expression }})\n{%- endif %}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.394709}, "macro.dbt_utils.test_not_null_proportion": {"unique_id": "macro.dbt_utils.test_not_null_proportion", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/not_null_proportion.sql", "original_file_path": "macros/generic_tests/not_null_proportion.sql", "name": "test_not_null_proportion", "macro_sql": "{% macro test_not_null_proportion(model) %}\n {{ return(adapter.dispatch('test_not_null_proportion', 'dbt_utils')(model, **kwargs)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_not_null_proportion"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.3952441}, "macro.dbt_utils.default__test_not_null_proportion": {"unique_id": "macro.dbt_utils.default__test_not_null_proportion", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/not_null_proportion.sql", "original_file_path": "macros/generic_tests/not_null_proportion.sql", "name": "default__test_not_null_proportion", "macro_sql": "{% macro default__test_not_null_proportion(model) %}\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\nwith validation as (\n select\n sum(case when {{ column_name }} is null then 0 else 1 end) / cast(count(*) as numeric) as not_null_proportion\n from {{ model }}\n),\nvalidation_errors as (\n select\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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.3957949}, "macro.dbt_utils.test_sequential_values": {"unique_id": "macro.dbt_utils.test_sequential_values", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/sequential_values.sql", "original_file_path": "macros/generic_tests/sequential_values.sql", "name": "test_sequential_values", "macro_sql": "{% test sequential_values(model, column_name, interval=1, datepart=None) %}\n\n {{ return(adapter.dispatch('test_sequential_values', 'dbt_utils')(model, column_name, interval, datepart)) }}\n\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_sequential_values"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.396569}, "macro.dbt_utils.default__test_sequential_values": {"unique_id": "macro.dbt_utils.default__test_sequential_values", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/sequential_values.sql", "original_file_path": "macros/generic_tests/sequential_values.sql", "name": "default__test_sequential_values", "macro_sql": "{% macro default__test_sequential_values(model, column_name, interval=1, datepart=None) %}\n\n{% set previous_column_name = \"previous_\" ~ dbt_utils.slugify(column_name) %}\n\nwith windowed as (\n\n select\n {{ column_name }},\n lag({{ column_name }}) over (\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_utils.type_timestamp() }})= cast({{ dbt_utils.dateadd(datepart, interval, previous_column_name) }} as {{ dbt_utils.type_timestamp() }}))\n {% else %}\n where not({{ column_name }} = {{ previous_column_name }} + {{ interval }})\n {% endif %}\n)\n\nselect *\nfrom validation_errors\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.slugify", "macro.dbt_utils.type_timestamp", "macro.dbt_utils.dateadd"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.397321}, "macro.dbt_utils.test_not_null_where": {"unique_id": "macro.dbt_utils.test_not_null_where", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/test_not_null_where.sql", "original_file_path": "macros/generic_tests/test_not_null_where.sql", "name": "test_not_null_where", "macro_sql": "{% test not_null_where(model, column_name) %}\r\n {%- set deprecation_warning = '\r\n Warning: `dbt_utils.not_null_where` is no longer supported.\r\n Starting in dbt v0.20.0, the built-in `not_null` test supports a `where` config.\r\n ' -%}\r\n {%- do exceptions.warn(deprecation_warning) -%}\r\n {{ return(adapter.dispatch('test_not_null_where', 'dbt_utils')(model, column_name)) }}\r\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_not_null_where"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.397866}, "macro.dbt_utils.default__test_not_null_where": {"unique_id": "macro.dbt_utils.default__test_not_null_where", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/test_not_null_where.sql", "original_file_path": "macros/generic_tests/test_not_null_where.sql", "name": "default__test_not_null_where", "macro_sql": "{% macro default__test_not_null_where(model, column_name) %}\r\n {{ return(test_not_null(model, column_name)) }}\r\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.test_not_null"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.398043}, "macro.dbt_utils.test_equality": {"unique_id": "macro.dbt_utils.test_equality", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/equality.sql", "original_file_path": "macros/generic_tests/equality.sql", "name": "test_equality", "macro_sql": "{% test equality(model, compare_model, compare_columns=None) %}\n {{ return(adapter.dispatch('test_equality', 'dbt_utils')(model, compare_model, compare_columns)) }}\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_equality"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.398891}, "macro.dbt_utils.default__test_equality": {"unique_id": "macro.dbt_utils.default__test_equality", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/equality.sql", "original_file_path": "macros/generic_tests/equality.sql", "name": "default__test_equality", "macro_sql": "{% macro default__test_equality(model, compare_model, compare_columns=None) %}\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-- setup\n{%- do dbt_utils._is_relation(model, 'test_equality') -%}\n\n{#-\nIf the compare_cols arg is provided, we can run this test without querying the\ninformation schema\u00a0\u2014 this allows the model to be an ephemeral model\n-#}\n\n{%- if not compare_columns -%}\n {%- do dbt_utils._is_ephemeral(model, 'test_equality') -%}\n {%- set compare_columns = adapter.get_columns_in_relation(model) | map(attribute='quoted') -%}\n{%- endif -%}\n\n{% set compare_cols_csv = compare_columns | join(', ') %}\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_utils.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_utils.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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils._is_relation", "macro.dbt_utils._is_ephemeral", "macro.dbt_utils.except"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.399832}, "macro.dbt_utils.test_mutually_exclusive_ranges": {"unique_id": "macro.dbt_utils.test_mutually_exclusive_ranges", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/mutually_exclusive_ranges.sql", "original_file_path": "macros/generic_tests/mutually_exclusive_ranges.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_mutually_exclusive_ranges"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.4030569}, "macro.dbt_utils.default__test_mutually_exclusive_ranges": {"unique_id": "macro.dbt_utils.default__test_mutually_exclusive_ranges", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/mutually_exclusive_ranges.sql", "original_file_path": "macros/generic_tests/mutually_exclusive_ranges.sql", "name": "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 }}\n ) as next_lower_bound,\n\n row_number() over (\n {{ partition_clause }}\n order by {{ lower_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 nore 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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.404608}, "macro.dbt_utils.pretty_log_format": {"unique_id": "macro.dbt_utils.pretty_log_format", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/jinja_helpers/pretty_log_format.sql", "original_file_path": "macros/jinja_helpers/pretty_log_format.sql", "name": "pretty_log_format", "macro_sql": "{% macro pretty_log_format(message) %}\n {{ return(adapter.dispatch('pretty_log_format', 'dbt_utils')(message)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__pretty_log_format"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.405036}, "macro.dbt_utils.default__pretty_log_format": {"unique_id": "macro.dbt_utils.default__pretty_log_format", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/jinja_helpers/pretty_log_format.sql", "original_file_path": "macros/jinja_helpers/pretty_log_format.sql", "name": "default__pretty_log_format", "macro_sql": "{% macro default__pretty_log_format(message) %}\n {{ return( dbt_utils.pretty_time() ~ ' + ' ~ message) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.pretty_time"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.405209}, "macro.dbt_utils.pretty_time": {"unique_id": "macro.dbt_utils.pretty_time", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/jinja_helpers/pretty_time.sql", "original_file_path": "macros/jinja_helpers/pretty_time.sql", "name": "pretty_time", "macro_sql": "{% macro pretty_time(format='%H:%M:%S') %}\n {{ return(adapter.dispatch('pretty_time', 'dbt_utils')(format)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__pretty_time"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.4055731}, "macro.dbt_utils.default__pretty_time": {"unique_id": "macro.dbt_utils.default__pretty_time", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/jinja_helpers/pretty_time.sql", "original_file_path": "macros/jinja_helpers/pretty_time.sql", "name": "default__pretty_time", "macro_sql": "{% macro default__pretty_time(format='%H:%M:%S') %}\n {{ return(modules.datetime.datetime.now().strftime(format)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.405795}, "macro.dbt_utils.log_info": {"unique_id": "macro.dbt_utils.log_info", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/jinja_helpers/log_info.sql", "original_file_path": "macros/jinja_helpers/log_info.sql", "name": "log_info", "macro_sql": "{% macro log_info(message) %}\n {{ return(adapter.dispatch('log_info', 'dbt_utils')(message)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__log_info"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.406141}, "macro.dbt_utils.default__log_info": {"unique_id": "macro.dbt_utils.default__log_info", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/jinja_helpers/log_info.sql", "original_file_path": "macros/jinja_helpers/log_info.sql", "name": "default__log_info", "macro_sql": "{% macro default__log_info(message) %}\n {{ log(dbt_utils.pretty_log_format(message), info=True) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.pretty_log_format"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.406323}, "macro.dbt_utils.slugify": {"unique_id": "macro.dbt_utils.slugify", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/jinja_helpers/slugify.sql", "original_file_path": "macros/jinja_helpers/slugify.sql", "name": "slugify", "macro_sql": "{% macro slugify(string) %}\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\n{{ return(string) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.406889}, "macro.dbt_utils.get_intervals_between": {"unique_id": "macro.dbt_utils.get_intervals_between", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/date_spine.sql", "original_file_path": "macros/sql/date_spine.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__get_intervals_between"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.407665}, "macro.dbt_utils.default__get_intervals_between": {"unique_id": "macro.dbt_utils.default__get_intervals_between", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/date_spine.sql", "original_file_path": "macros/sql/date_spine.sql", "name": "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_utils.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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement", "macro.dbt_utils.datediff"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.408297}, "macro.dbt_utils.date_spine": {"unique_id": "macro.dbt_utils.date_spine", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/date_spine.sql", "original_file_path": "macros/sql/date_spine.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__date_spine"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.408545}, "macro.dbt_utils.default__date_spine": {"unique_id": "macro.dbt_utils.default__date_spine", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/date_spine.sql", "original_file_path": "macros/sql/date_spine.sql", "name": "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 \"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_utils.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\nfiltered as (\n\n select *\n from all_periods\n where date_{{datepart}} <= {{ end_date }}\n\n)\n\nselect * from filtered\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.generate_series", "macro.dbt_utils.get_intervals_between", "macro.dbt_utils.dateadd"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.408929}, "macro.dbt_utils.nullcheck_table": {"unique_id": "macro.dbt_utils.nullcheck_table", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/nullcheck_table.sql", "original_file_path": "macros/sql/nullcheck_table.sql", "name": "nullcheck_table", "macro_sql": "{% macro nullcheck_table(relation) %}\n {{ return(adapter.dispatch('nullcheck_table', 'dbt_utils')(relation)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__nullcheck_table"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.40936}, "macro.dbt_utils.default__nullcheck_table": {"unique_id": "macro.dbt_utils.default__nullcheck_table", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/nullcheck_table.sql", "original_file_path": "macros/sql/nullcheck_table.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils._is_relation", "macro.dbt_utils._is_ephemeral", "macro.dbt_utils.nullcheck"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.4098198}, "macro.dbt_utils.get_relations_by_pattern": {"unique_id": "macro.dbt_utils.get_relations_by_pattern", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/get_relations_by_pattern.sql", "original_file_path": "macros/sql/get_relations_by_pattern.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__get_relations_by_pattern"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.410592}, "macro.dbt_utils.default__get_relations_by_pattern": {"unique_id": "macro.dbt_utils.default__get_relations_by_pattern", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/get_relations_by_pattern.sql", "original_file_path": "macros/sql/get_relations_by_pattern.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement", "macro.dbt_utils.get_tables_by_pattern_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.411519}, "macro.dbt_utils.get_powers_of_two": {"unique_id": "macro.dbt_utils.get_powers_of_two", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/generate_series.sql", "original_file_path": "macros/sql/generate_series.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__get_powers_of_two"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.412435}, "macro.dbt_utils.default__get_powers_of_two": {"unique_id": "macro.dbt_utils.default__get_powers_of_two", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/generate_series.sql", "original_file_path": "macros/sql/generate_series.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.412879}, "macro.dbt_utils.generate_series": {"unique_id": "macro.dbt_utils.generate_series", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/generate_series.sql", "original_file_path": "macros/sql/generate_series.sql", "name": "generate_series", "macro_sql": "{% macro generate_series(upper_bound) %}\n {{ return(adapter.dispatch('generate_series', 'dbt_utils')(upper_bound)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__generate_series"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.4130769}, "macro.dbt_utils.default__generate_series": {"unique_id": "macro.dbt_utils.default__generate_series", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/generate_series.sql", "original_file_path": "macros/sql/generate_series.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.get_powers_of_two"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.41362}, "macro.dbt_utils.get_relations_by_prefix": {"unique_id": "macro.dbt_utils.get_relations_by_prefix", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/get_relations_by_prefix.sql", "original_file_path": "macros/sql/get_relations_by_prefix.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__get_relations_by_prefix"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.4143958}, "macro.dbt_utils.default__get_relations_by_prefix": {"unique_id": "macro.dbt_utils.default__get_relations_by_prefix", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/get_relations_by_prefix.sql", "original_file_path": "macros/sql/get_relations_by_prefix.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement", "macro.dbt_utils.get_tables_by_prefix_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.415293}, "macro.dbt_utils.get_tables_by_prefix_sql": {"unique_id": "macro.dbt_utils.get_tables_by_prefix_sql", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/get_tables_by_prefix_sql.sql", "original_file_path": "macros/sql/get_tables_by_prefix_sql.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__get_tables_by_prefix_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.415788}, "macro.dbt_utils.default__get_tables_by_prefix_sql": {"unique_id": "macro.dbt_utils.default__get_tables_by_prefix_sql", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/get_tables_by_prefix_sql.sql", "original_file_path": "macros/sql/get_tables_by_prefix_sql.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.get_tables_by_pattern_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.416082}, "macro.dbt_utils.star": {"unique_id": "macro.dbt_utils.star", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/star.sql", "original_file_path": "macros/sql/star.sql", "name": "star", "macro_sql": "{% macro star(from, relation_alias=False, except=[], prefix='', suffix='') -%}\n {{ return(adapter.dispatch('star', 'dbt_utils')(from, relation_alias, except, prefix, suffix)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__star"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.4168682}, "macro.dbt_utils.default__star": {"unique_id": "macro.dbt_utils.default__star", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/star.sql", "original_file_path": "macros/sql/star.sql", "name": "default__star", "macro_sql": "{% macro default__star(from, relation_alias=False, except=[], prefix='', suffix='') -%}\n {%- do dbt_utils._is_relation(from, 'star') -%}\n {%- do dbt_utils._is_ephemeral(from, 'star') -%}\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 cols = dbt_utils.get_filtered_columns_in_relation(from, except) %}\n\n {%- if cols|length <= 0 -%}\n {{- return('*') -}}\n {%- else -%}\n {%- for col in cols %}\n {%- if relation_alias %}{{ relation_alias }}.{% else %}{%- endif -%}{{ adapter.quote(col)|trim }} {%- if prefix!='' or suffix!='' %} as {{ adapter.quote(prefix ~ col ~ suffix)|trim }} {%- endif -%}\n {%- if not loop.last %},{{ '\\n ' }}{% endif %}\n {%- endfor -%}\n {% endif %}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "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}, "patch_path": null, "arguments": [], "created_at": 1661548508.41792}, "macro.dbt_utils.unpivot": {"unique_id": "macro.dbt_utils.unpivot", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/unpivot.sql", "original_file_path": "macros/sql/unpivot.sql", "name": "unpivot", "macro_sql": "{% macro unpivot(relation=none, cast_to='varchar', exclude=none, remove=none, field_name='field_name', value_name='value', table=none) -%}\n {{ return(adapter.dispatch('unpivot', 'dbt_utils')(relation, cast_to, exclude, remove, field_name, value_name, table)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__unpivot"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.419769}, "macro.dbt_utils.default__unpivot": {"unique_id": "macro.dbt_utils.default__unpivot", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/unpivot.sql", "original_file_path": "macros/sql/unpivot.sql", "name": "default__unpivot", "macro_sql": "{% macro default__unpivot(relation=none, cast_to='varchar', exclude=none, remove=none, field_name='field_name', value_name='value', table=none) -%}\n\n {% if table %}\n {%- set error_message = '\n Warning: the `unpivot` macro no longer accepts a `table` parameter. \\\n This parameter will be deprecated in a future release of dbt-utils. Use the `relation` parameter instead. \\\n The {}.{} model triggered this warning. \\\n '.format(model.package_name, model.name) -%}\n {%- do exceptions.warn(error_message) -%}\n {% endif %}\n\n {% if relation and table %}\n {{ exceptions.raise_compiler_error(\"Error: both the `relation` and `table` parameters were provided to `unpivot` macro. Choose one only (we recommend `relation`).\") }}\n {% elif not relation and table %}\n {% set relation=table %}\n {% elif not relation and not table %}\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 select\n {%- for exclude_col in exclude %}\n {{ exclude_col }},\n {%- endfor %}\n\n cast('{{ col.column }}' as {{ dbt_utils.type_string() }}) as {{ field_name }},\n cast( {% if col.data_type == 'boolean' %}\n {{ dbt_utils.cast_bool_to_text(col.column) }}\n {% else %}\n {{ col.column }}\n {% endif %}\n as {{ cast_to }}) as {{ value_name }}\n\n from {{ relation }}\n\n {% if not loop.last -%}\n union all\n {% endif -%}\n {%- endfor -%}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils._is_relation", "macro.dbt_utils._is_ephemeral", "macro.dbt_utils.type_string", "macro.dbt_utils.cast_bool_to_text"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.4220102}, "macro.dbt_utils.union_relations": {"unique_id": "macro.dbt_utils.union_relations", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/union.sql", "original_file_path": "macros/sql/union.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__union_relations"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.4248152}, "macro.dbt_utils.default__union_relations": {"unique_id": "macro.dbt_utils.default__union_relations", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/union.sql", "original_file_path": "macros/sql/union.sql", "name": "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\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 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 {%- 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 cast({{ dbt_utils.string_literal(relation) }} as {{ dbt_utils.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 {{ 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 -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils._is_relation", "macro.dbt_utils._is_ephemeral", "macro.dbt_utils.string_literal", "macro.dbt_utils.type_string"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.4279768}, "macro.dbt_utils.group_by": {"unique_id": "macro.dbt_utils.group_by", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/groupby.sql", "original_file_path": "macros/sql/groupby.sql", "name": "group_by", "macro_sql": "{%- macro group_by(n) -%}\n {{ return(adapter.dispatch('group_by', 'dbt_utils')(n)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__group_by"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.428472}, "macro.dbt_utils.default__group_by": {"unique_id": "macro.dbt_utils.default__group_by", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/groupby.sql", "original_file_path": "macros/sql/groupby.sql", "name": "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 -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.428738}, "macro.dbt_utils.deduplicate": {"unique_id": "macro.dbt_utils.deduplicate", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/deduplicate.sql", "original_file_path": "macros/sql/deduplicate.sql", "name": "deduplicate", "macro_sql": "{%- macro deduplicate(relation, partition_by, order_by=none, relation_alias=none) -%}\n\n {%- set error_message_group_by -%}\nWarning: the `group_by` parameter of the `deduplicate` macro is no longer supported and will be deprecated in a future release of dbt-utils.\nUse `partition_by` instead.\nThe {{ model.package_name }}.{{ model.name }} model triggered this warning.\n {%- endset -%}\n\n {% if kwargs.get('group_by') %}\n {%- do exceptions.warn(error_message_group_by) -%}\n {%- endif -%}\n\n {%- set error_message_order_by -%}\nWarning: `order_by` as an optional parameter of the `deduplicate` macro is no longer supported and will be deprecated in a future release of dbt-utils.\nSupply a non-null value for `order_by` instead.\nThe {{ model.package_name }}.{{ model.name }} model triggered this warning.\n {%- endset -%}\n\n {% if not order_by %}\n {%- do exceptions.warn(error_message_order_by) -%}\n {%- endif -%}\n\n {%- set error_message_alias -%}\nWarning: the `relation_alias` parameter of the `deduplicate` macro is no longer supported and will be deprecated in a future release of dbt-utils.\nIf you were using `relation_alias` to point to a CTE previously then you can now pass the alias directly to `relation` instead.\nThe {{ model.package_name }}.{{ model.name }} model triggered this warning.\n {%- endset -%}\n\n {% if relation_alias %}\n {%- do exceptions.warn(error_message_alias) -%}\n {%- endif -%}\n\n {% set partition_by = partition_by or kwargs.get('group_by') %}\n {% set relation = relation_alias or relation %}\n {% set order_by = order_by or \"'1'\" %}\n\n {{ return(adapter.dispatch('deduplicate', 'dbt_utils')(relation, partition_by, order_by)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.postgres__deduplicate"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.431253}, "macro.dbt_utils.default__deduplicate": {"unique_id": "macro.dbt_utils.default__deduplicate", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/deduplicate.sql", "original_file_path": "macros/sql/deduplicate.sql", "name": "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", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.431487}, "macro.dbt_utils.redshift__deduplicate": {"unique_id": "macro.dbt_utils.redshift__deduplicate", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/deduplicate.sql", "original_file_path": "macros/sql/deduplicate.sql", "name": "redshift__deduplicate", "macro_sql": "{% macro redshift__deduplicate(relation, partition_by, order_by) -%}\n\n {{ return(dbt_utils.default__deduplicate(relation, partition_by, order_by=order_by)) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__deduplicate"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.431705}, "macro.dbt_utils.postgres__deduplicate": {"unique_id": "macro.dbt_utils.postgres__deduplicate", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/deduplicate.sql", "original_file_path": "macros/sql/deduplicate.sql", "name": "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", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.431905}, "macro.dbt_utils.snowflake__deduplicate": {"unique_id": "macro.dbt_utils.snowflake__deduplicate", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/deduplicate.sql", "original_file_path": "macros/sql/deduplicate.sql", "name": "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", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.4320698}, "macro.dbt_utils.bigquery__deduplicate": {"unique_id": "macro.dbt_utils.bigquery__deduplicate", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/deduplicate.sql", "original_file_path": "macros/sql/deduplicate.sql", "name": "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 -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.432246}, "macro.dbt_utils.surrogate_key": {"unique_id": "macro.dbt_utils.surrogate_key", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/surrogate_key.sql", "original_file_path": "macros/sql/surrogate_key.sql", "name": "surrogate_key", "macro_sql": "{%- macro surrogate_key(field_list) -%}\n {# needed for safe_add to allow for non-keyword arguments see SO post #}\n {# https://stackoverflow.com/questions/13944751/args-kwargs-in-jinja2-macros #}\n {% set frustrating_jinja_feature = varargs %}\n {{ return(adapter.dispatch('surrogate_key', 'dbt_utils')(field_list, *varargs)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__surrogate_key"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.433012}, "macro.dbt_utils.default__surrogate_key": {"unique_id": "macro.dbt_utils.default__surrogate_key", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/surrogate_key.sql", "original_file_path": "macros/sql/surrogate_key.sql", "name": "default__surrogate_key", "macro_sql": "\n\n{%- macro default__surrogate_key(field_list) -%}\n\n{%- if varargs|length >= 1 or field_list is string %}\n\n{%- set error_message = '\nWarning: the `surrogate_key` macro now takes a single list argument instead of \\\nmultiple string arguments. Support for multiple string arguments will be \\\ndeprecated in a future release of dbt-utils. The {}.{} model triggered this warning. \\\n'.format(model.package_name, model.name) -%}\n\n{%- do exceptions.warn(error_message) -%}\n\n{# first argument is not included in varargs, so add first element to field_list_xf #}\n{%- set field_list_xf = [field_list] -%}\n\n{%- for field in varargs %}\n{%- set _ = field_list_xf.append(field) -%}\n{%- endfor -%}\n\n{%- else -%}\n\n{# if using list, just set field_list_xf as field_list #}\n{%- set field_list_xf = field_list -%}\n\n{%- endif -%}\n\n\n{%- set fields = [] -%}\n\n{%- for field in field_list_xf -%}\n\n {%- set _ = fields.append(\n \"coalesce(cast(\" ~ field ~ \" as \" ~ dbt_utils.type_string() ~ \"), '')\"\n ) -%}\n\n {%- if not loop.last %}\n {%- set _ = fields.append(\"'-'\") -%}\n {%- endif -%}\n\n{%- endfor -%}\n\n{{dbt_utils.hash(dbt_utils.concat(fields))}}\n\n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.type_string", "macro.dbt_utils.hash", "macro.dbt_utils.concat"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.4340138}, "macro.dbt_utils.safe_add": {"unique_id": "macro.dbt_utils.safe_add", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/safe_add.sql", "original_file_path": "macros/sql/safe_add.sql", "name": "safe_add", "macro_sql": "{%- macro safe_add() -%}\n {# needed for safe_add to allow for non-keyword arguments see SO post #}\n {# https://stackoverflow.com/questions/13944751/args-kwargs-in-jinja2-macros #}\n {% set frustrating_jinja_feature = varargs %}\n {{ return(adapter.dispatch('safe_add', 'dbt_utils')(*varargs)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__safe_add"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.4345841}, "macro.dbt_utils.default__safe_add": {"unique_id": "macro.dbt_utils.default__safe_add", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/safe_add.sql", "original_file_path": "macros/sql/safe_add.sql", "name": "default__safe_add", "macro_sql": "\n\n{%- macro default__safe_add() -%}\n\n{% set fields = [] %}\n\n{%- for field in varargs -%}\n\n {% do fields.append(\"coalesce(\" ~ field ~ \", 0)\") %}\n\n{%- endfor -%}\n\n{{ fields|join(' +\\n ') }}\n\n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.43489}, "macro.dbt_utils.nullcheck": {"unique_id": "macro.dbt_utils.nullcheck", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/nullcheck.sql", "original_file_path": "macros/sql/nullcheck.sql", "name": "nullcheck", "macro_sql": "{% macro nullcheck(cols) %}\n {{ return(adapter.dispatch('nullcheck', 'dbt_utils')(cols)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__nullcheck"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.435334}, "macro.dbt_utils.default__nullcheck": {"unique_id": "macro.dbt_utils.default__nullcheck", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/nullcheck.sql", "original_file_path": "macros/sql/nullcheck.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.435681}, "macro.dbt_utils.get_tables_by_pattern_sql": {"unique_id": "macro.dbt_utils.get_tables_by_pattern_sql", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/get_tables_by_pattern_sql.sql", "original_file_path": "macros/sql/get_tables_by_pattern_sql.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__get_tables_by_pattern_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.437249}, "macro.dbt_utils.default__get_tables_by_pattern_sql": {"unique_id": "macro.dbt_utils.default__get_tables_by_pattern_sql", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/get_tables_by_pattern_sql.sql", "original_file_path": "macros/sql/get_tables_by_pattern_sql.sql", "name": "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 \"table_schema\",\n table_name as \"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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.get_table_types_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.437531}, "macro.dbt_utils.bigquery__get_tables_by_pattern_sql": {"unique_id": "macro.dbt_utils.bigquery__get_tables_by_pattern_sql", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/get_tables_by_pattern_sql.sql", "original_file_path": "macros/sql/get_tables_by_pattern_sql.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils._bigquery__get_matching_schemata", "macro.dbt_utils.get_table_types_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.4383821}, "macro.dbt_utils._bigquery__get_matching_schemata": {"unique_id": "macro.dbt_utils._bigquery__get_matching_schemata", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/get_tables_by_pattern_sql.sql", "original_file_path": "macros/sql/get_tables_by_pattern_sql.sql", "name": "_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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.438907}, "macro.dbt_utils.get_column_values": {"unique_id": "macro.dbt_utils.get_column_values", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/get_column_values.sql", "original_file_path": "macros/sql/get_column_values.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__get_column_values"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.440126}, "macro.dbt_utils.default__get_column_values": {"unique_id": "macro.dbt_utils.default__get_column_values", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/get_column_values.sql", "original_file_path": "macros/sql/get_column_values.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils._is_ephemeral", "macro.dbt.load_relation", "macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.44172}, "macro.dbt_utils.pivot": {"unique_id": "macro.dbt_utils.pivot", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/pivot.sql", "original_file_path": "macros/sql/pivot.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__pivot"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.4429162}, "macro.dbt_utils.default__pivot": {"unique_id": "macro.dbt_utils.default__pivot", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/pivot.sql", "original_file_path": "macros/sql/pivot.sql", "name": "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_utils.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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.escape_single_quotes", "macro.dbt_utils.slugify"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.443794}, "macro.dbt_utils.get_filtered_columns_in_relation": {"unique_id": "macro.dbt_utils.get_filtered_columns_in_relation", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/get_filtered_columns_in_relation.sql", "original_file_path": "macros/sql/get_filtered_columns_in_relation.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__get_filtered_columns_in_relation"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.4443772}, "macro.dbt_utils.default__get_filtered_columns_in_relation": {"unique_id": "macro.dbt_utils.default__get_filtered_columns_in_relation", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/get_filtered_columns_in_relation.sql", "original_file_path": "macros/sql/get_filtered_columns_in_relation.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils._is_relation", "macro.dbt_utils._is_ephemeral"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.4451299}, "macro.dbt_utils.get_query_results_as_dict": {"unique_id": "macro.dbt_utils.get_query_results_as_dict", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/get_query_results_as_dict.sql", "original_file_path": "macros/sql/get_query_results_as_dict.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__get_query_results_as_dict"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.445614}, "macro.dbt_utils.default__get_query_results_as_dict": {"unique_id": "macro.dbt_utils.default__get_query_results_as_dict", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/get_query_results_as_dict.sql", "original_file_path": "macros/sql/get_query_results_as_dict.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.4462411}, "macro.dbt_utils.get_table_types_sql": {"unique_id": "macro.dbt_utils.get_table_types_sql", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/get_table_types_sql.sql", "original_file_path": "macros/sql/get_table_types_sql.sql", "name": "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", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.postgres__get_table_types_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.446802}, "macro.dbt_utils.default__get_table_types_sql": {"unique_id": "macro.dbt_utils.default__get_table_types_sql", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/get_table_types_sql.sql", "original_file_path": "macros/sql/get_table_types_sql.sql", "name": "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 \"table_type\"\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.4468951}, "macro.dbt_utils.postgres__get_table_types_sql": {"unique_id": "macro.dbt_utils.postgres__get_table_types_sql", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/get_table_types_sql.sql", "original_file_path": "macros/sql/get_table_types_sql.sql", "name": "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 \"table_type\"\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.446986}, "macro.dbt_utils.bigquery__get_table_types_sql": {"unique_id": "macro.dbt_utils.bigquery__get_table_types_sql", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/get_table_types_sql.sql", "original_file_path": "macros/sql/get_table_types_sql.sql", "name": "bigquery__get_table_types_sql", "macro_sql": "{% macro bigquery__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 `table_type`\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.447071}, "macro.dbt_utils.degrees_to_radians": {"unique_id": "macro.dbt_utils.degrees_to_radians", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/haversine_distance.sql", "original_file_path": "macros/sql/haversine_distance.sql", "name": "degrees_to_radians", "macro_sql": "{% macro degrees_to_radians(degrees) -%}\n acos(-1) * {{degrees}} / 180\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.448216}, "macro.dbt_utils.haversine_distance": {"unique_id": "macro.dbt_utils.haversine_distance", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/haversine_distance.sql", "original_file_path": "macros/sql/haversine_distance.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__haversine_distance"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.44853}, "macro.dbt_utils.default__haversine_distance": {"unique_id": "macro.dbt_utils.default__haversine_distance", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/haversine_distance.sql", "original_file_path": "macros/sql/haversine_distance.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.454043}, "macro.dbt_utils.bigquery__haversine_distance": {"unique_id": "macro.dbt_utils.bigquery__haversine_distance", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/haversine_distance.sql", "original_file_path": "macros/sql/haversine_distance.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.degrees_to_radians"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.455038}, "macro.spark_utils.get_tables": {"unique_id": "macro.spark_utils.get_tables", "package_name": "spark_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/spark_utils", "path": "macros/maintenance_operation.sql", "original_file_path": "macros/maintenance_operation.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.459979}, "macro.spark_utils.get_delta_tables": {"unique_id": "macro.spark_utils.get_delta_tables", "package_name": "spark_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/spark_utils", "path": "macros/maintenance_operation.sql", "original_file_path": "macros/maintenance_operation.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.spark_utils.get_tables", "macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.46068}, "macro.spark_utils.get_statistic_columns": {"unique_id": "macro.spark_utils.get_statistic_columns", "package_name": "spark_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/spark_utils", "path": "macros/maintenance_operation.sql", "original_file_path": "macros/maintenance_operation.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.46157}, "macro.spark_utils.spark_optimize_delta_tables": {"unique_id": "macro.spark_utils.spark_optimize_delta_tables", "package_name": "spark_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/spark_utils", "path": "macros/maintenance_operation.sql", "original_file_path": "macros/maintenance_operation.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.spark_utils.get_delta_tables", "macro.dbt_utils.log_info", "macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.4623082}, "macro.spark_utils.spark_vacuum_delta_tables": {"unique_id": "macro.spark_utils.spark_vacuum_delta_tables", "package_name": "spark_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/spark_utils", "path": "macros/maintenance_operation.sql", "original_file_path": "macros/maintenance_operation.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.spark_utils.get_delta_tables", "macro.dbt_utils.log_info", "macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.463052}, "macro.spark_utils.spark_analyze_tables": {"unique_id": "macro.spark_utils.spark_analyze_tables", "package_name": "spark_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/spark_utils", "path": "macros/maintenance_operation.sql", "original_file_path": "macros/maintenance_operation.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "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}, "patch_path": null, "arguments": [], "created_at": 1661548508.464103}, "macro.spark_utils.spark__concat": {"unique_id": "macro.spark_utils.spark__concat", "package_name": "spark_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/spark_utils", "path": "macros/dbt_utils/cross_db_utils/concat.sql", "original_file_path": "macros/dbt_utils/cross_db_utils/concat.sql", "name": "spark__concat", "macro_sql": "{% macro spark__concat(fields) -%}\n concat({{ fields|join(', ') }})\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.4645178}, "macro.spark_utils.spark__type_numeric": {"unique_id": "macro.spark_utils.spark__type_numeric", "package_name": "spark_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/spark_utils", "path": "macros/dbt_utils/cross_db_utils/datatypes.sql", "original_file_path": "macros/dbt_utils/cross_db_utils/datatypes.sql", "name": "spark__type_numeric", "macro_sql": "{% macro spark__type_numeric() %}\n decimal(28, 6)\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.464725}, "macro.spark_utils.spark__dateadd": {"unique_id": "macro.spark_utils.spark__dateadd", "package_name": "spark_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/spark_utils", "path": "macros/dbt_utils/cross_db_utils/dateadd.sql", "original_file_path": "macros/dbt_utils/cross_db_utils/dateadd.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.spark_utils.assert_not_null"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.467713}, "macro.spark_utils.spark__datediff": {"unique_id": "macro.spark_utils.spark__datediff", "package_name": "spark_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/spark_utils", "path": "macros/dbt_utils/cross_db_utils/datediff.sql", "original_file_path": "macros/dbt_utils/cross_db_utils/datediff.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.spark_utils.assert_not_null"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.4753149}, "macro.spark_utils.spark__current_timestamp": {"unique_id": "macro.spark_utils.spark__current_timestamp", "package_name": "spark_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/spark_utils", "path": "macros/dbt_utils/cross_db_utils/current_timestamp.sql", "original_file_path": "macros/dbt_utils/cross_db_utils/current_timestamp.sql", "name": "spark__current_timestamp", "macro_sql": "{% macro spark__current_timestamp() %}\n current_timestamp()\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.4756212}, "macro.spark_utils.spark__current_timestamp_in_utc": {"unique_id": "macro.spark_utils.spark__current_timestamp_in_utc", "package_name": "spark_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/spark_utils", "path": "macros/dbt_utils/cross_db_utils/current_timestamp.sql", "original_file_path": "macros/dbt_utils/cross_db_utils/current_timestamp.sql", "name": "spark__current_timestamp_in_utc", "macro_sql": "{% macro spark__current_timestamp_in_utc() %}\n unix_timestamp()\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.4756968}, "macro.spark_utils.spark__split_part": {"unique_id": "macro.spark_utils.spark__split_part", "package_name": "spark_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/spark_utils", "path": "macros/dbt_utils/cross_db_utils/split_part.sql", "original_file_path": "macros/dbt_utils/cross_db_utils/split_part.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.4763288}, "macro.spark_utils.spark__get_relations_by_pattern": {"unique_id": "macro.spark_utils.spark__get_relations_by_pattern", "package_name": "spark_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/spark_utils", "path": "macros/dbt_utils/sql/get_relations_by_prefix.sql", "original_file_path": "macros/dbt_utils/sql/get_relations_by_prefix.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.477979}, "macro.spark_utils.spark__get_relations_by_prefix": {"unique_id": "macro.spark_utils.spark__get_relations_by_prefix", "package_name": "spark_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/spark_utils", "path": "macros/dbt_utils/sql/get_relations_by_prefix.sql", "original_file_path": "macros/dbt_utils/sql/get_relations_by_prefix.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.spark_utils.spark__get_relations_by_pattern"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.4784489}, "macro.spark_utils.spark__get_tables_by_pattern": {"unique_id": "macro.spark_utils.spark__get_tables_by_pattern", "package_name": "spark_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/spark_utils", "path": "macros/dbt_utils/sql/get_relations_by_prefix.sql", "original_file_path": "macros/dbt_utils/sql/get_relations_by_prefix.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.spark_utils.spark__get_relations_by_pattern"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.478843}, "macro.spark_utils.spark__get_tables_by_prefix": {"unique_id": "macro.spark_utils.spark__get_tables_by_prefix", "package_name": "spark_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/spark_utils", "path": "macros/dbt_utils/sql/get_relations_by_prefix.sql", "original_file_path": "macros/dbt_utils/sql/get_relations_by_prefix.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.spark_utils.spark__get_relations_by_prefix"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.479153}, "macro.spark_utils.assert_not_null": {"unique_id": "macro.spark_utils.assert_not_null", "package_name": "spark_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/spark_utils", "path": "macros/etc/assert_not_null.sql", "original_file_path": "macros/etc/assert_not_null.sql", "name": "assert_not_null", "macro_sql": "{% macro assert_not_null(function, arg) -%}\n {{ return(adapter.dispatch('assert_not_null', 'spark_utils')(function, arg)) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.spark_utils.default__assert_not_null"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.479593}, "macro.spark_utils.default__assert_not_null": {"unique_id": "macro.spark_utils.default__assert_not_null", "package_name": "spark_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/spark_utils", "path": "macros/etc/assert_not_null.sql", "original_file_path": "macros/etc/assert_not_null.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.479796}, "macro.spark_utils.spark__convert_timezone": {"unique_id": "macro.spark_utils.spark__convert_timezone", "package_name": "spark_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/spark_utils", "path": "macros/snowplow/convert_timezone.sql", "original_file_path": "macros/snowplow/convert_timezone.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.480087}, "macro.fivetran_utils.enabled_vars": {"unique_id": "macro.fivetran_utils.enabled_vars", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/enabled_vars.sql", "original_file_path": "macros/enabled_vars.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.480581}, "macro.fivetran_utils.percentile": {"unique_id": "macro.fivetran_utils.percentile", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/percentile.sql", "original_file_path": "macros/percentile.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.fivetran_utils.postgres__percentile"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.481552}, "macro.fivetran_utils.default__percentile": {"unique_id": "macro.fivetran_utils.default__percentile", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/percentile.sql", "original_file_path": "macros/percentile.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.48172}, "macro.fivetran_utils.redshift__percentile": {"unique_id": "macro.fivetran_utils.redshift__percentile", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/percentile.sql", "original_file_path": "macros/percentile.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.481879}, "macro.fivetran_utils.bigquery__percentile": {"unique_id": "macro.fivetran_utils.bigquery__percentile", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/percentile.sql", "original_file_path": "macros/percentile.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.4820402}, "macro.fivetran_utils.postgres__percentile": {"unique_id": "macro.fivetran_utils.postgres__percentile", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/percentile.sql", "original_file_path": "macros/percentile.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.4821818}, "macro.fivetran_utils.spark__percentile": {"unique_id": "macro.fivetran_utils.spark__percentile", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/percentile.sql", "original_file_path": "macros/percentile.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.482341}, "macro.fivetran_utils.pivot_json_extract": {"unique_id": "macro.fivetran_utils.pivot_json_extract", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/pivot_json_extract.sql", "original_file_path": "macros/pivot_json_extract.sql", "name": "pivot_json_extract", "macro_sql": "{% macro pivot_json_extract(string, list_of_properties) %}\n\n{%- for property in list_of_properties -%}\n\nreplace( {{ fivetran_utils.json_extract(string, property) }}, '\"', '') as {{ property | replace(' ', '_') | lower }}\n\n{%- if not loop.last -%},{%- endif %}\n{% endfor -%}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.fivetran_utils.json_extract"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.482838}, "macro.fivetran_utils.persist_pass_through_columns": {"unique_id": "macro.fivetran_utils.persist_pass_through_columns", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/persist_pass_through_columns.sql", "original_file_path": "macros/persist_pass_through_columns.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.483797}, "macro.fivetran_utils.json_parse": {"unique_id": "macro.fivetran_utils.json_parse", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/json_parse.sql", "original_file_path": "macros/json_parse.sql", "name": "json_parse", "macro_sql": "{% macro json_parse(string, string_path) -%}\n\n{{ adapter.dispatch('json_parse', 'fivetran_utils') (string, string_path) }}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.fivetran_utils.postgres__json_parse"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.484873}, "macro.fivetran_utils.default__json_parse": {"unique_id": "macro.fivetran_utils.default__json_parse", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/json_parse.sql", "original_file_path": "macros/json_parse.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.485117}, "macro.fivetran_utils.redshift__json_parse": {"unique_id": "macro.fivetran_utils.redshift__json_parse", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/json_parse.sql", "original_file_path": "macros/json_parse.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.485358}, "macro.fivetran_utils.bigquery__json_parse": {"unique_id": "macro.fivetran_utils.bigquery__json_parse", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/json_parse.sql", "original_file_path": "macros/json_parse.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.485596}, "macro.fivetran_utils.postgres__json_parse": {"unique_id": "macro.fivetran_utils.postgres__json_parse", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/json_parse.sql", "original_file_path": "macros/json_parse.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.485832}, "macro.fivetran_utils.snowflake__json_parse": {"unique_id": "macro.fivetran_utils.snowflake__json_parse", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/json_parse.sql", "original_file_path": "macros/json_parse.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.486096}, "macro.fivetran_utils.spark__json_parse": {"unique_id": "macro.fivetran_utils.spark__json_parse", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/json_parse.sql", "original_file_path": "macros/json_parse.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.48636}, "macro.fivetran_utils.max_bool": {"unique_id": "macro.fivetran_utils.max_bool", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/max_bool.sql", "original_file_path": "macros/max_bool.sql", "name": "max_bool", "macro_sql": "{% macro max_bool(boolean_field) -%}\n\n{{ adapter.dispatch('max_bool', 'fivetran_utils') (boolean_field) }}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.fivetran_utils.default__max_bool"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.4867358}, "macro.fivetran_utils.default__max_bool": {"unique_id": "macro.fivetran_utils.default__max_bool", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/max_bool.sql", "original_file_path": "macros/max_bool.sql", "name": "default__max_bool", "macro_sql": "{% macro default__max_bool(boolean_field) %}\n\n bool_or( {{ boolean_field }} )\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.486838}, "macro.fivetran_utils.snowflake__max_bool": {"unique_id": "macro.fivetran_utils.snowflake__max_bool", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/max_bool.sql", "original_file_path": "macros/max_bool.sql", "name": "snowflake__max_bool", "macro_sql": "{% macro snowflake__max_bool(boolean_field) %}\n\n max( {{ boolean_field }} )\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.486934}, "macro.fivetran_utils.bigquery__max_bool": {"unique_id": "macro.fivetran_utils.bigquery__max_bool", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/max_bool.sql", "original_file_path": "macros/max_bool.sql", "name": "bigquery__max_bool", "macro_sql": "{% macro bigquery__max_bool(boolean_field) %}\n\n max( {{ boolean_field }} )\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.48703}, "macro.fivetran_utils.calculated_fields": {"unique_id": "macro.fivetran_utils.calculated_fields", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/calculated_fields.sql", "original_file_path": "macros/calculated_fields.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.487456}, "macro.fivetran_utils.seed_data_helper": {"unique_id": "macro.fivetran_utils.seed_data_helper", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/seed_data_helper.sql", "original_file_path": "macros/seed_data_helper.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.4882371}, "macro.fivetran_utils.fill_pass_through_columns": {"unique_id": "macro.fivetran_utils.fill_pass_through_columns", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/fill_pass_through_columns.sql", "original_file_path": "macros/fill_pass_through_columns.sql", "name": "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.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 {% endfor %}\n{% endif %}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.4891121}, "macro.fivetran_utils.string_agg": {"unique_id": "macro.fivetran_utils.string_agg", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/string_agg.sql", "original_file_path": "macros/string_agg.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.fivetran_utils.default__string_agg"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.489697}, "macro.fivetran_utils.default__string_agg": {"unique_id": "macro.fivetran_utils.default__string_agg", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/string_agg.sql", "original_file_path": "macros/string_agg.sql", "name": "default__string_agg", "macro_sql": "{% macro default__string_agg(field_to_agg, delimiter) %}\n string_agg({{ field_to_agg }}, {{ delimiter }})\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.489847}, "macro.fivetran_utils.snowflake__string_agg": {"unique_id": "macro.fivetran_utils.snowflake__string_agg", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/string_agg.sql", "original_file_path": "macros/string_agg.sql", "name": "snowflake__string_agg", "macro_sql": "{% macro snowflake__string_agg(field_to_agg, delimiter) %}\n listagg({{ field_to_agg }}, {{ delimiter }})\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.4899871}, "macro.fivetran_utils.redshift__string_agg": {"unique_id": "macro.fivetran_utils.redshift__string_agg", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/string_agg.sql", "original_file_path": "macros/string_agg.sql", "name": "redshift__string_agg", "macro_sql": "{% macro redshift__string_agg(field_to_agg, delimiter) %}\n listagg({{ field_to_agg }}, {{ delimiter }})\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.490127}, "macro.fivetran_utils.spark__string_agg": {"unique_id": "macro.fivetran_utils.spark__string_agg", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/string_agg.sql", "original_file_path": "macros/string_agg.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.490272}, "macro.fivetran_utils.timestamp_diff": {"unique_id": "macro.fivetran_utils.timestamp_diff", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/timestamp_diff.sql", "original_file_path": "macros/timestamp_diff.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.fivetran_utils.postgres__timestamp_diff"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.493228}, "macro.fivetran_utils.default__timestamp_diff": {"unique_id": "macro.fivetran_utils.default__timestamp_diff", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/timestamp_diff.sql", "original_file_path": "macros/timestamp_diff.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.493401}, "macro.fivetran_utils.redshift__timestamp_diff": {"unique_id": "macro.fivetran_utils.redshift__timestamp_diff", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/timestamp_diff.sql", "original_file_path": "macros/timestamp_diff.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.493566}, "macro.fivetran_utils.bigquery__timestamp_diff": {"unique_id": "macro.fivetran_utils.bigquery__timestamp_diff", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/timestamp_diff.sql", "original_file_path": "macros/timestamp_diff.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.4937332}, "macro.fivetran_utils.postgres__timestamp_diff": {"unique_id": "macro.fivetran_utils.postgres__timestamp_diff", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/timestamp_diff.sql", "original_file_path": "macros/timestamp_diff.sql", "name": "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_utils.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_utils.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_utils.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_utils.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_utils.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_utils.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_utils.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_utils.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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.datediff"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.495583}, "macro.fivetran_utils.try_cast": {"unique_id": "macro.fivetran_utils.try_cast", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/try_cast.sql", "original_file_path": "macros/try_cast.sql", "name": "try_cast", "macro_sql": "{% macro try_cast(field, type) %}\n {{ adapter.dispatch('try_cast', 'fivetran_utils') (field, type) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.fivetran_utils.postgres__try_cast"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.496601}, "macro.fivetran_utils.default__safe_cast": {"unique_id": "macro.fivetran_utils.default__safe_cast", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/try_cast.sql", "original_file_path": "macros/try_cast.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.496747}, "macro.fivetran_utils.redshift__try_cast": {"unique_id": "macro.fivetran_utils.redshift__try_cast", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/try_cast.sql", "original_file_path": "macros/try_cast.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.497043}, "macro.fivetran_utils.postgres__try_cast": {"unique_id": "macro.fivetran_utils.postgres__try_cast", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/try_cast.sql", "original_file_path": "macros/try_cast.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.497347}, "macro.fivetran_utils.snowflake__try_cast": {"unique_id": "macro.fivetran_utils.snowflake__try_cast", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/try_cast.sql", "original_file_path": "macros/try_cast.sql", "name": "snowflake__try_cast", "macro_sql": "{% macro snowflake__try_cast(field, type) %}\n try_cast(cast({{field}} as varchar) as {{type}})\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.4974852}, "macro.fivetran_utils.bigquery__try_cast": {"unique_id": "macro.fivetran_utils.bigquery__try_cast", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/try_cast.sql", "original_file_path": "macros/try_cast.sql", "name": "bigquery__try_cast", "macro_sql": "{% macro bigquery__try_cast(field, type) %}\n safe_cast({{field}} as {{type}})\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.497621}, "macro.fivetran_utils.spark__try_cast": {"unique_id": "macro.fivetran_utils.spark__try_cast", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/try_cast.sql", "original_file_path": "macros/try_cast.sql", "name": "spark__try_cast", "macro_sql": "{% macro spark__try_cast(field, type) %}\n try_cast({{field}} as {{type}})\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.497746}, "macro.fivetran_utils.source_relation": {"unique_id": "macro.fivetran_utils.source_relation", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/source_relation.sql", "original_file_path": "macros/source_relation.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.fivetran_utils.default__source_relation"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.498333}, "macro.fivetran_utils.default__source_relation": {"unique_id": "macro.fivetran_utils.default__source_relation", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/source_relation.sql", "original_file_path": "macros/source_relation.sql", "name": "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_utils.type_string() }}) as source_relation\n{% endif %}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.type_string"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.498956}, "macro.fivetran_utils.first_value": {"unique_id": "macro.fivetran_utils.first_value", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/first_value.sql", "original_file_path": "macros/first_value.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.fivetran_utils.default__first_value"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.499552}, "macro.fivetran_utils.default__first_value": {"unique_id": "macro.fivetran_utils.default__first_value", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/first_value.sql", "original_file_path": "macros/first_value.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.4997709}, "macro.fivetran_utils.redshift__first_value": {"unique_id": "macro.fivetran_utils.redshift__first_value", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/first_value.sql", "original_file_path": "macros/first_value.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.5}, "macro.fivetran_utils.add_dbt_source_relation": {"unique_id": "macro.fivetran_utils.add_dbt_source_relation", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/add_dbt_source_relation.sql", "original_file_path": "macros/add_dbt_source_relation.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.500347}, "macro.fivetran_utils.add_pass_through_columns": {"unique_id": "macro.fivetran_utils.add_pass_through_columns", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/add_pass_through_columns.sql", "original_file_path": "macros/add_pass_through_columns.sql", "name": "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.alias %}\n\n {% do base_columns.append({ \"name\": column.name, \"alias\": column.alias, \"datatype\": column.datatype if column.datatype else dbt_utils.type_string()}) %}\n\n {% else %}\n\n {% do base_columns.append({ \"name\": column.name, \"datatype\": column.datatype if column.datatype else dbt_utils.type_string()}) %}\n \n {% endif %}\n\n {% endfor %}\n\n {% endif %}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.type_string"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.501371}, "macro.fivetran_utils.union_relations": {"unique_id": "macro.fivetran_utils.union_relations", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/union_relations.sql", "original_file_path": "macros/union_relations.sql", "name": "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_utils.string_literal(relation) }} as {{ dbt_utils.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", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils._is_relation", "macro.dbt_utils.string_literal", "macro.dbt_utils.type_string"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.5054588}, "macro.fivetran_utils.union_tables": {"unique_id": "macro.fivetran_utils.union_tables", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/union_relations.sql", "original_file_path": "macros/union_relations.sql", "name": "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 -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.union_relations"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.505879}, "macro.fivetran_utils.snowflake_seed_data": {"unique_id": "macro.fivetran_utils.snowflake_seed_data", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/snowflake_seed_data.sql", "original_file_path": "macros/snowflake_seed_data.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.506428}, "macro.fivetran_utils.fill_staging_columns": {"unique_id": "macro.fivetran_utils.fill_staging_columns", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/fill_staging_columns.sql", "original_file_path": "macros/fill_staging_columns.sql", "name": "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\n{%- for column in staging_columns %}\n {% if column.name|lower in source_column_names -%}\n {{ fivetran_utils.quote_column(column) }} as \n {%- if 'alias' in column %} {{ column.alias }} {% else %} {{ fivetran_utils.quote_column(column) }} {%- endif -%}\n {%- else -%}\n cast(null as {{ column.datatype }})\n {%- if 'alias' in column %} as {{ column.alias }} {% else %} as {{ fivetran_utils.quote_column(column) }} {% endif -%}\n {%- endif -%}\n {%- if not loop.last -%} , {% endif -%}\n{% endfor %}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.fivetran_utils.quote_column"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.508075}, "macro.fivetran_utils.quote_column": {"unique_id": "macro.fivetran_utils.quote_column", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/fill_staging_columns.sql", "original_file_path": "macros/fill_staging_columns.sql", "name": "quote_column", "macro_sql": "{% macro quote_column(column) %}\n {% if 'quote' in column %}\n {% if column.quote %}\n {% if target.type in ('bigquery', 'spark') %}\n `{{ column.name }}`\n {% elif target.type == 'snowflake' %}\n \"{{ column.name | upper }}\"\n {% else %}\n \"{{ column.name }}\"\n {% endif %}\n {% else %}\n {{ column.name }}\n {% endif %}\n {% else %}\n {{ column.name }}\n {% endif %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.50866}, "macro.fivetran_utils.json_extract": {"unique_id": "macro.fivetran_utils.json_extract", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/json_extract.sql", "original_file_path": "macros/json_extract.sql", "name": "json_extract", "macro_sql": "{% macro json_extract(string, string_path) -%}\n\n{{ adapter.dispatch('json_extract', 'fivetran_utils') (string, string_path) }}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.fivetran_utils.postgres__json_extract"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.509307}, "macro.fivetran_utils.default__json_extract": {"unique_id": "macro.fivetran_utils.default__json_extract", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/json_extract.sql", "original_file_path": "macros/json_extract.sql", "name": "default__json_extract", "macro_sql": "{% macro default__json_extract(string, string_path) %}\n\n json_extract_path_text({{string}}, {{ \"'\" ~ string_path ~ \"'\" }} )\n \n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.509471}, "macro.fivetran_utils.snowflake__json_extract": {"unique_id": "macro.fivetran_utils.snowflake__json_extract", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/json_extract.sql", "original_file_path": "macros/json_extract.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.5096362}, "macro.fivetran_utils.redshift__json_extract": {"unique_id": "macro.fivetran_utils.redshift__json_extract", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/json_extract.sql", "original_file_path": "macros/json_extract.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.509814}, "macro.fivetran_utils.bigquery__json_extract": {"unique_id": "macro.fivetran_utils.bigquery__json_extract", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/json_extract.sql", "original_file_path": "macros/json_extract.sql", "name": "bigquery__json_extract", "macro_sql": "{% macro bigquery__json_extract(string, string_path) %}\n\n json_extract_scalar({{string}}, {{ \"'$.\" ~ string_path ~ \"'\" }} )\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.509969}, "macro.fivetran_utils.postgres__json_extract": {"unique_id": "macro.fivetran_utils.postgres__json_extract", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/json_extract.sql", "original_file_path": "macros/json_extract.sql", "name": "postgres__json_extract", "macro_sql": "{% macro postgres__json_extract(string, string_path) %}\n\n {{string}}::json->>{{\"'\" ~ string_path ~ \"'\" }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.510122}, "macro.fivetran_utils.collect_freshness": {"unique_id": "macro.fivetran_utils.collect_freshness", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/collect_freshness.sql", "original_file_path": "macros/collect_freshness.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.fivetran_utils.default__collect_freshness"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.5108879}, "macro.fivetran_utils.default__collect_freshness": {"unique_id": "macro.fivetran_utils.default__collect_freshness", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/collect_freshness.sql", "original_file_path": "macros/collect_freshness.sql", "name": "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 {{ return(load_result('collect_freshness').table) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement", "macro.dbt_utils.current_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.511939}, "macro.fivetran_utils.timestamp_add": {"unique_id": "macro.fivetran_utils.timestamp_add", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/timestamp_add.sql", "original_file_path": "macros/timestamp_add.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.fivetran_utils.postgres__timestamp_add"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.5127602}, "macro.fivetran_utils.default__timestamp_add": {"unique_id": "macro.fivetran_utils.default__timestamp_add", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/timestamp_add.sql", "original_file_path": "macros/timestamp_add.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.5129359}, "macro.fivetran_utils.bigquery__timestamp_add": {"unique_id": "macro.fivetran_utils.bigquery__timestamp_add", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/timestamp_add.sql", "original_file_path": "macros/timestamp_add.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.513104}, "macro.fivetran_utils.redshift__timestamp_add": {"unique_id": "macro.fivetran_utils.redshift__timestamp_add", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/timestamp_add.sql", "original_file_path": "macros/timestamp_add.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.51327}, "macro.fivetran_utils.postgres__timestamp_add": {"unique_id": "macro.fivetran_utils.postgres__timestamp_add", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/timestamp_add.sql", "original_file_path": "macros/timestamp_add.sql", "name": "postgres__timestamp_add", "macro_sql": "{% macro postgres__timestamp_add(datepart, interval, from_timestamp) %}\n\n {{ from_timestamp }} + ((interval '1 {{ datepart }}') * ({{ interval }}))\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.51344}, "macro.fivetran_utils.spark__timestamp_add": {"unique_id": "macro.fivetran_utils.spark__timestamp_add", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/timestamp_add.sql", "original_file_path": "macros/timestamp_add.sql", "name": "spark__timestamp_add", "macro_sql": "{% macro spark__timestamp_add(datepart, interval, from_timestamp) %}\n\n {{ dbt_utils.dateadd(datepart, interval, from_timestamp) }}\n \n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.dateadd"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.513624}, "macro.fivetran_utils.ceiling": {"unique_id": "macro.fivetran_utils.ceiling", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/ceiling.sql", "original_file_path": "macros/ceiling.sql", "name": "ceiling", "macro_sql": "{% macro ceiling(num) -%}\n\n{{ adapter.dispatch('ceiling', 'fivetran_utils') (num) }}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.fivetran_utils.default__ceiling"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.513983}, "macro.fivetran_utils.default__ceiling": {"unique_id": "macro.fivetran_utils.default__ceiling", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/ceiling.sql", "original_file_path": "macros/ceiling.sql", "name": "default__ceiling", "macro_sql": "{% macro default__ceiling(num) %}\n ceiling({{ num }})\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.5142589}, "macro.fivetran_utils.snowflake__ceiling": {"unique_id": "macro.fivetran_utils.snowflake__ceiling", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/ceiling.sql", "original_file_path": "macros/ceiling.sql", "name": "snowflake__ceiling", "macro_sql": "{% macro snowflake__ceiling(num) %}\n ceil({{ num }})\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.5143812}, "macro.fivetran_utils.remove_prefix_from_columns": {"unique_id": "macro.fivetran_utils.remove_prefix_from_columns", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/remove_prefix_from_columns.sql", "original_file_path": "macros/remove_prefix_from_columns.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.51518}, "macro.fivetran_utils.union_data": {"unique_id": "macro.fivetran_utils.union_data", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/union_data.sql", "original_file_path": "macros/union_data.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.fivetran_utils.default__union_data"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.51649}, "macro.fivetran_utils.default__union_data": {"unique_id": "macro.fivetran_utils.default__union_data", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/union_data.sql", "original_file_path": "macros/union_data.sql", "name": "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\n {% set relation=adapter.get_relation(\n database=var(database_variable, default_database),\n schema=schema,\n identifier=table_identifier\n ) -%}\n \n {% set relation_exists=relation is not none %}\n\n {% if relation_exists %}\n\n {% do relations.append(relation) %}\n \n {% endif %}\n\n {% endfor %}\n\n {{ dbt_utils.union_relations(relations) }}\n\n{% elif var(union_database_variable, none) %}\n\n {% set relations = [] %}\n\n {% for database in var(union_database_variable) %}\n\n {% set relation=adapter.get_relation(\n database=database,\n schema=var(schema_variable, default_schema),\n identifier=table_identifier\n ) -%}\n\n {% set relation_exists=relation is not none %}\n\n {% if relation_exists %}\n\n {% do relations.append(relation) %}\n \n {% endif %}\n\n {% endfor %}\n\n {{ dbt_utils.union_relations(relations) }}\n\n{% else %}\n\n select * \n from {{ var(default_variable) }}\n\n{% endif %}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.union_relations"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.5183702}, "macro.fivetran_utils.dummy_coalesce_value": {"unique_id": "macro.fivetran_utils.dummy_coalesce_value", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/dummy_coalesce_value.sql", "original_file_path": "macros/dummy_coalesce_value.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.520027}, "macro.fivetran_utils.array_agg": {"unique_id": "macro.fivetran_utils.array_agg", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/array_agg.sql", "original_file_path": "macros/array_agg.sql", "name": "array_agg", "macro_sql": "{% macro array_agg(field_to_agg) -%}\n\n{{ adapter.dispatch('array_agg', 'fivetran_utils') (field_to_agg) }}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.fivetran_utils.default__array_agg"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.5204182}, "macro.fivetran_utils.default__array_agg": {"unique_id": "macro.fivetran_utils.default__array_agg", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/array_agg.sql", "original_file_path": "macros/array_agg.sql", "name": "default__array_agg", "macro_sql": "{% macro default__array_agg(field_to_agg) %}\n array_agg({{ field_to_agg }})\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.520533}, "macro.fivetran_utils.redshift__array_agg": {"unique_id": "macro.fivetran_utils.redshift__array_agg", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/array_agg.sql", "original_file_path": "macros/array_agg.sql", "name": "redshift__array_agg", "macro_sql": "{% macro redshift__array_agg(field_to_agg) %}\n listagg({{ field_to_agg }}, ',')\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.5206468}, "macro.fivetran_utils.empty_variable_warning": {"unique_id": "macro.fivetran_utils.empty_variable_warning", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/empty_variable_warning.sql", "original_file_path": "macros/empty_variable_warning.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.521148}, "macro.fivetran_utils.enabled_vars_one_true": {"unique_id": "macro.fivetran_utils.enabled_vars_one_true", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/enabled_vars_one_true.sql", "original_file_path": "macros/enabled_vars_one_true.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.521646}, "macro.apple_search_ads_source.get_ad_group_history_columns": {"unique_id": "macro.apple_search_ads_source.get_ad_group_history_columns", "package_name": "apple_search_ads_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "macros/get_ad_group_history_columns.sql", "original_file_path": "macros/get_ad_group_history_columns.sql", "name": "get_ad_group_history_columns", "macro_sql": "{% macro get_ad_group_history_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"automated_keywords_opt_in\", \"datatype\": \"boolean\"},\n {\"name\": \"campaign_id\", \"datatype\": dbt_utils.type_int()},\n {\"name\": \"cpa_goal_amount\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"cpa_goal_currency\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"default_cpc_bid_amount\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"default_cpc_bid_currency\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"deleted\", \"datatype\": \"boolean\"},\n {\"name\": \"end_time\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"id\", \"datatype\": dbt_utils.type_int()},\n {\"name\": \"modification_time\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"name\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"organization_id\", \"datatype\": dbt_utils.type_int()},\n {\"name\": \"serving_state_reasons\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"serving_status\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"start_time\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"status\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"storefronts\", \"datatype\": dbt_utils.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.type_timestamp", "macro.dbt_utils.type_int", "macro.dbt_utils.type_numeric", "macro.dbt_utils.type_string"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.523832}, "macro.apple_search_ads_source.get_ad_level_report_columns": {"unique_id": "macro.apple_search_ads_source.get_ad_level_report_columns", "package_name": "apple_search_ads_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "macros/get_ad_level_report_columns.sql", "original_file_path": "macros/get_ad_level_report_columns.sql", "name": "get_ad_level_report_columns", "macro_sql": "{% macro get_ad_level_report_columns() %}\n\n{% set columns = [\n {\"name\": \"ad_group_id\", \"datatype\": dbt_utils.type_int()},\n {\"name\": \"ad_id\", \"datatype\": dbt_utils.type_int()},\n {\"name\": \"campaign_id\", \"datatype\": dbt_utils.type_int()},\n {\"name\": \"date\", \"datatype\": \"date\"},\n {\"name\": \"impressions\", \"datatype\": dbt_utils.type_int()},\n {\"name\": \"local_spend_amount\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"local_spend_currency\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"new_downloads\", \"datatype\": dbt_utils.type_int()},\n {\"name\": \"redownloads\", \"datatype\": dbt_utils.type_int()},\n {\"name\": \"taps\", \"datatype\": dbt_utils.type_int()}\n] %}\n\n{{ fivetran_utils.add_pass_through_columns(columns, var('apple_search_ads__ad_passthrough_metrics')) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.type_int", "macro.dbt_utils.type_numeric", "macro.dbt_utils.type_string", "macro.fivetran_utils.add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.525237}, "macro.apple_search_ads_source.get_search_term_report_columns": {"unique_id": "macro.apple_search_ads_source.get_search_term_report_columns", "package_name": "apple_search_ads_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "macros/get_search_term_report_columns.sql", "original_file_path": "macros/get_search_term_report_columns.sql", "name": "get_search_term_report_columns", "macro_sql": "{% macro get_search_term_report_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_id\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"ad_group_deleted\", \"datatype\": \"boolean\"},\n {\"name\": \"ad_group_id\", \"datatype\": dbt_utils.type_int()},\n {\"name\": \"ad_group_name\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"bid_amount_amount\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"bid_amount_currency\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"campaign_id\", \"datatype\": dbt_utils.type_int()},\n {\"name\": \"date\", \"datatype\": \"date\"},\n {\"name\": \"deleted\", \"datatype\": \"boolean\"},\n {\"name\": \"impressions\", \"datatype\": dbt_utils.type_int()},\n {\"name\": \"keyword\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"keyword_display_status\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"keyword_id\", \"datatype\": dbt_utils.type_int()},\n {\"name\": \"local_spend_amount\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"local_spend_currency\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"match_type\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"new_downloads\", \"datatype\": dbt_utils.type_int()},\n {\"name\": \"redownloads\", \"datatype\": dbt_utils.type_int()},\n {\"name\": \"search_term_source\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"search_term_text\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"taps\", \"datatype\": dbt_utils.type_int()}\n] %}\n\n{{ return(columns) }}\n\n{{ fivetran_utils.add_pass_through_columns(columns, var('apple_search_ads__search_term_passthrough_metrics')) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.type_string", "macro.dbt_utils.type_int", "macro.dbt_utils.type_numeric", "macro.fivetran_utils.add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.527933}, "macro.apple_search_ads_source.get_keyword_report_columns": {"unique_id": "macro.apple_search_ads_source.get_keyword_report_columns", "package_name": "apple_search_ads_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "macros/get_keyword_report_columns.sql", "original_file_path": "macros/get_keyword_report_columns.sql", "name": "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_utils.type_int()},\n {\"name\": \"impressions\", \"datatype\": dbt_utils.type_int()},\n {\"name\": \"local_spend_amount\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"local_spend_currency\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"new_downloads\", \"datatype\": dbt_utils.type_int()},\n {\"name\": \"redownloads\", \"datatype\": dbt_utils.type_int()},\n {\"name\": \"taps\", \"datatype\": dbt_utils.type_int()}\n] %}\n\n{{ fivetran_utils.add_pass_through_columns(columns, var('apple_search_ads__keyword_passthrough_metrics')) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.type_int", "macro.dbt_utils.type_numeric", "macro.dbt_utils.type_string", "macro.fivetran_utils.add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.52917}, "macro.apple_search_ads_source.get_campaign_report_columns": {"unique_id": "macro.apple_search_ads_source.get_campaign_report_columns", "package_name": "apple_search_ads_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "macros/get_campaign_report_columns.sql", "original_file_path": "macros/get_campaign_report_columns.sql", "name": "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_utils.type_int()},\n {\"name\": \"impressions\", \"datatype\": dbt_utils.type_int()},\n {\"name\": \"local_spend_amount\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"local_spend_currency\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"new_downloads\", \"datatype\": dbt_utils.type_int()},\n {\"name\": \"redownloads\", \"datatype\": dbt_utils.type_int()},\n {\"name\": \"taps\", \"datatype\": dbt_utils.type_int()}\n] %}\n\n{{ fivetran_utils.add_pass_through_columns(columns, var('apple_search_ads__campaign_passthrough_metrics')) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.type_int", "macro.dbt_utils.type_numeric", "macro.dbt_utils.type_string", "macro.fivetran_utils.add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.5303428}, "macro.apple_search_ads_source.get_campaign_history_columns": {"unique_id": "macro.apple_search_ads_source.get_campaign_history_columns", "package_name": "apple_search_ads_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "macros/get_campaign_history_columns.sql", "original_file_path": "macros/get_campaign_history_columns.sql", "name": "get_campaign_history_columns", "macro_sql": "{% macro get_campaign_history_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"adam_id\", \"datatype\": dbt_utils.type_int()},\n {\"name\": \"budget_amount\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"budget_currency\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"budget_orders\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"daily_budget_amount\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"daily_budget_currency\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"deleted\", \"datatype\": \"boolean\"},\n {\"name\": \"end_time\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"id\", \"datatype\": dbt_utils.type_int()},\n {\"name\": \"loc_invoice_detail_buyer_email\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"loc_invoice_detail_buyer_name\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"loc_invoice_detail_client_name\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"loc_invoice_detail_order_number\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"modification_time\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"name\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"organization_id\", \"datatype\": dbt_utils.type_int()},\n {\"name\": \"payment_model\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"serving_state_reasons\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"serving_status\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"start_time\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"status\", \"datatype\": dbt_utils.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.type_timestamp", "macro.dbt_utils.type_int", "macro.dbt_utils.type_numeric", "macro.dbt_utils.type_string"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.5329652}, "macro.apple_search_ads_source.get_ad_history_columns": {"unique_id": "macro.apple_search_ads_source.get_ad_history_columns", "package_name": "apple_search_ads_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "macros/get_ad_history_columns.sql", "original_file_path": "macros/get_ad_history_columns.sql", "name": "get_ad_history_columns", "macro_sql": "{% macro get_ad_history_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"ad_group_id\", \"datatype\": dbt_utils.type_int()},\n {\"name\": \"campaign_id\", \"datatype\": dbt_utils.type_int()},\n {\"name\": \"creation_time\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"creative_id\", \"datatype\": dbt_utils.type_int()},\n {\"name\": \"creative_type\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"deleted\", \"datatype\": \"boolean\"},\n {\"name\": \"id\", \"datatype\": dbt_utils.type_int()},\n {\"name\": \"modification_time\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"name\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"org_id\", \"datatype\": dbt_utils.type_int()},\n {\"name\": \"serving_status\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"status\", \"datatype\": dbt_utils.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.type_timestamp", "macro.dbt_utils.type_int", "macro.dbt_utils.type_string"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.534636}, "macro.apple_search_ads_source.get_ad_group_report_columns": {"unique_id": "macro.apple_search_ads_source.get_ad_group_report_columns", "package_name": "apple_search_ads_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "macros/get_ad_group_report_columns.sql", "original_file_path": "macros/get_ad_group_report_columns.sql", "name": "get_ad_group_report_columns", "macro_sql": "{% macro get_ad_group_report_columns() %}\n\n{% set columns = [\n {\"name\": \"ad_group_id\", \"datatype\": dbt_utils.type_int()},\n {\"name\": \"date\", \"datatype\": \"date\"},\n {\"name\": \"impressions\", \"datatype\": dbt_utils.type_int()},\n {\"name\": \"local_spend_amount\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"local_spend_currency\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"new_downloads\", \"datatype\": dbt_utils.type_int()},\n {\"name\": \"redownloads\", \"datatype\": dbt_utils.type_int()},\n {\"name\": \"taps\", \"datatype\": dbt_utils.type_int()}\n] %}\n\n{{ fivetran_utils.add_pass_through_columns(columns, var('apple_search_ads__ad_group_passthrough_metrics')) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.type_int", "macro.dbt_utils.type_numeric", "macro.dbt_utils.type_string", "macro.fivetran_utils.add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.535815}, "macro.apple_search_ads_source.get_organization_columns": {"unique_id": "macro.apple_search_ads_source.get_organization_columns", "package_name": "apple_search_ads_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "macros/get_organization_columns.sql", "original_file_path": "macros/get_organization_columns.sql", "name": "get_organization_columns", "macro_sql": "{% macro get_organization_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"currency\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"id\", \"datatype\": dbt_utils.type_int()},\n {\"name\": \"name\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"payment_model\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"role_names\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"time_zone\", \"datatype\": dbt_utils.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.type_timestamp", "macro.dbt_utils.type_string", "macro.dbt_utils.type_int"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.5368252}, "macro.apple_search_ads_source.get_keyword_history_columns": {"unique_id": "macro.apple_search_ads_source.get_keyword_history_columns", "package_name": "apple_search_ads_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/ad_reporting/apple_search/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "macros/get_keyword_history_columns.sql", "original_file_path": "macros/get_keyword_history_columns.sql", "name": "get_keyword_history_columns", "macro_sql": "{% macro get_keyword_history_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"ad_group_id\", \"datatype\": dbt_utils.type_int()},\n {\"name\": \"bid_amount\", \"datatype\": dbt_utils.type_numeric()},\n {\"name\": \"bid_currency\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"campaign_id\", \"datatype\": dbt_utils.type_int()},\n {\"name\": \"deleted\", \"datatype\": \"boolean\"},\n {\"name\": \"id\", \"datatype\": dbt_utils.type_int()},\n {\"name\": \"match_type\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"modification_time\", \"datatype\": dbt_utils.type_timestamp()},\n {\"name\": \"status\", \"datatype\": dbt_utils.type_string()},\n {\"name\": \"text\", \"datatype\": dbt_utils.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.type_timestamp", "macro.dbt_utils.type_int", "macro.dbt_utils.type_numeric", "macro.dbt_utils.type_string"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1661548508.538205}}, "docs": {"dbt.__overview__": {"unique_id": "dbt.__overview__", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.0.4/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "overview.md", "original_file_path": "docs/overview.md", "name": "__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"}}, "exposures": {}, "metrics": {}, "selectors": {}, "disabled": {}, "parent_map": {"seed.apple_search_ads_integration_tests.ad_group_report_data": [], "seed.apple_search_ads_integration_tests.ad_report_data": [], "seed.apple_search_ads_integration_tests.keyword_report_data": [], "seed.apple_search_ads_integration_tests.ad_history_data": [], "seed.apple_search_ads_integration_tests.ad_group_history_data": [], "seed.apple_search_ads_integration_tests.campaign_history_data": [], "seed.apple_search_ads_integration_tests.campaign_report_data": [], "seed.apple_search_ads_integration_tests.keyword_history_data": [], "seed.apple_search_ads_integration_tests.search_term_report_data": [], "seed.apple_search_ads_integration_tests.organization_data": [], "model.apple_search_ads.apple_search_ads__ad_report": ["model.apple_search_ads_source.stg_apple_search_ads__ad_group_history", "model.apple_search_ads_source.stg_apple_search_ads__ad_history", "model.apple_search_ads_source.stg_apple_search_ads__ad_report", "model.apple_search_ads_source.stg_apple_search_ads__campaign_history", "model.apple_search_ads_source.stg_apple_search_ads__organization"], "model.apple_search_ads.apple_search_ads__ad_group_report": ["model.apple_search_ads_source.stg_apple_search_ads__ad_group_history", "model.apple_search_ads_source.stg_apple_search_ads__ad_group_report", "model.apple_search_ads_source.stg_apple_search_ads__campaign_history", "model.apple_search_ads_source.stg_apple_search_ads__organization"], "model.apple_search_ads.apple_search_ads__keyword_report": ["model.apple_search_ads_source.stg_apple_search_ads__ad_group_history", "model.apple_search_ads_source.stg_apple_search_ads__campaign_history", "model.apple_search_ads_source.stg_apple_search_ads__keyword_history", "model.apple_search_ads_source.stg_apple_search_ads__keyword_report", "model.apple_search_ads_source.stg_apple_search_ads__organization"], "model.apple_search_ads.apple_search_ads__search_term_report": ["model.apple_search_ads_source.stg_apple_search_ads__campaign_history", "model.apple_search_ads_source.stg_apple_search_ads__organization", "model.apple_search_ads_source.stg_apple_search_ads__search_term_report"], "model.apple_search_ads.apple_search_ads__campaign_report": ["model.apple_search_ads_source.stg_apple_search_ads__campaign_history", "model.apple_search_ads_source.stg_apple_search_ads__campaign_report", "model.apple_search_ads_source.stg_apple_search_ads__organization"], "model.apple_search_ads.apple_search_ads__organization_report": ["model.apple_search_ads_source.stg_apple_search_ads__campaign_history", "model.apple_search_ads_source.stg_apple_search_ads__campaign_report", "model.apple_search_ads_source.stg_apple_search_ads__organization"], "model.apple_search_ads_source.stg_apple_search_ads__campaign_history": ["model.apple_search_ads_source.stg_apple_search_ads__campaign_history_tmp", "model.apple_search_ads_source.stg_apple_search_ads__campaign_history_tmp"], "model.apple_search_ads_source.stg_apple_search_ads__ad_report": ["model.apple_search_ads_source.stg_apple_search_ads__ad_report_tmp", "model.apple_search_ads_source.stg_apple_search_ads__ad_report_tmp"], "model.apple_search_ads_source.stg_apple_search_ads__campaign_report": ["model.apple_search_ads_source.stg_apple_search_ads__campaign_report_tmp", "model.apple_search_ads_source.stg_apple_search_ads__campaign_report_tmp"], "model.apple_search_ads_source.stg_apple_search_ads__organization": ["model.apple_search_ads_source.stg_apple_search_ads__organization_tmp", "model.apple_search_ads_source.stg_apple_search_ads__organization_tmp"], "model.apple_search_ads_source.stg_apple_search_ads__keyword_report": ["model.apple_search_ads_source.stg_apple_search_ads__keyword_report_tmp", "model.apple_search_ads_source.stg_apple_search_ads__keyword_report_tmp"], "model.apple_search_ads_source.stg_apple_search_ads__keyword_history": ["model.apple_search_ads_source.stg_apple_search_ads__keyword_history_tmp", "model.apple_search_ads_source.stg_apple_search_ads__keyword_history_tmp"], "model.apple_search_ads_source.stg_apple_search_ads__search_term_report": ["model.apple_search_ads_source.stg_apple_search_ads__search_term_report_tmp", "model.apple_search_ads_source.stg_apple_search_ads__search_term_report_tmp"], "model.apple_search_ads_source.stg_apple_search_ads__ad_group_history": ["model.apple_search_ads_source.stg_apple_search_ads__ad_group_history_tmp", "model.apple_search_ads_source.stg_apple_search_ads__ad_group_history_tmp"], "model.apple_search_ads_source.stg_apple_search_ads__ad_history": ["model.apple_search_ads_source.stg_apple_search_ads__ad_history_tmp", "model.apple_search_ads_source.stg_apple_search_ads__ad_history_tmp"], "model.apple_search_ads_source.stg_apple_search_ads__ad_group_report": ["model.apple_search_ads_source.stg_apple_search_ads__ad_group_report_tmp", "model.apple_search_ads_source.stg_apple_search_ads__ad_group_report_tmp"], "model.apple_search_ads_source.stg_apple_search_ads__search_term_report_tmp": ["source.apple_search_ads_source.apple_search_ads.search_term_report"], "model.apple_search_ads_source.stg_apple_search_ads__campaign_history_tmp": ["source.apple_search_ads_source.apple_search_ads.campaign_history"], "model.apple_search_ads_source.stg_apple_search_ads__keyword_history_tmp": ["source.apple_search_ads_source.apple_search_ads.keyword_history"], "model.apple_search_ads_source.stg_apple_search_ads__ad_group_history_tmp": ["source.apple_search_ads_source.apple_search_ads.ad_group_history"], "model.apple_search_ads_source.stg_apple_search_ads__ad_group_report_tmp": ["source.apple_search_ads_source.apple_search_ads.ad_group_report"], "model.apple_search_ads_source.stg_apple_search_ads__ad_history_tmp": ["source.apple_search_ads_source.apple_search_ads.ad_history"], "model.apple_search_ads_source.stg_apple_search_ads__campaign_report_tmp": ["source.apple_search_ads_source.apple_search_ads.campaign_report"], "model.apple_search_ads_source.stg_apple_search_ads__organization_tmp": ["source.apple_search_ads_source.apple_search_ads.organization"], "model.apple_search_ads_source.stg_apple_search_ads__keyword_report_tmp": ["source.apple_search_ads_source.apple_search_ads.keyword_report"], "model.apple_search_ads_source.stg_apple_search_ads__ad_report_tmp": ["source.apple_search_ads_source.apple_search_ads.ad_level_report"], "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.dbt_utils_unique_combination_of_columns_apple_search_ads__ad_group_report_organization_id__campaign_id__ad_group_id__date_day.19d180bab9": ["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.dbt_utils_unique_combination_of_columns_apple_search_ads__ad_report_organization_id__campaign_id__ad_group_id__ad_id__date_day.54e27817a1": ["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.dbt_utils_unique_combination_of_columns_apple_search_ads__campaign_report_organization_id__campaign_id__date_day.647e56213f": ["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.dbt_utils_unique_combination_of_columns_apple_search_ads__keyword_report_organization_id__campaign_id__ad_group_id__keyword_id__date_day.78fb033a13": ["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.dbt_utils_unique_combination_of_columns_apple_search_ads__organization_report_organization_id__date_day.8bc84fccc3": ["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.dbt_utils_unique_combination_of_columns_apple_search_ads__search_term_report_search_term_text__date_day.e60fe79ec4": ["model.apple_search_ads.apple_search_ads__search_term_report"], "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_group_history_modified_at.e5d65fa28f": ["model.apple_search_ads_source.stg_apple_search_ads__ad_group_history"], "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_group_history_ad_group_id.dc128eecb7": ["model.apple_search_ads_source.stg_apple_search_ads__ad_group_history"], "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__ad_group_history_ad_group_id__modified_at.84af14c83b": ["model.apple_search_ads_source.stg_apple_search_ads__ad_group_history"], "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_group_report_ad_group_id.a115f9cfc1": ["model.apple_search_ads_source.stg_apple_search_ads__ad_group_report"], "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_group_report_date_day.4dfd46a43b": ["model.apple_search_ads_source.stg_apple_search_ads__ad_group_report"], "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__ad_group_report_ad_group_id__date_day.a0fcc4e33c": ["model.apple_search_ads_source.stg_apple_search_ads__ad_group_report"], "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_history_modified_at.2eea7e006d": ["model.apple_search_ads_source.stg_apple_search_ads__ad_history"], "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_history_ad_id.4ad3bde32a": ["model.apple_search_ads_source.stg_apple_search_ads__ad_history"], "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__ad_history_ad_id__modified_at.38599b8cba": ["model.apple_search_ads_source.stg_apple_search_ads__ad_history"], "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_report_date_day.e6252346d8": ["model.apple_search_ads_source.stg_apple_search_ads__ad_report"], "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_report_ad_group_id.a397755e9f": ["model.apple_search_ads_source.stg_apple_search_ads__ad_report"], "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_report_ad_id.d08e760c58": ["model.apple_search_ads_source.stg_apple_search_ads__ad_report"], "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__ad_report_ad_id__date_day__ad_group_id.0d8d23c516": ["model.apple_search_ads_source.stg_apple_search_ads__ad_report"], "test.apple_search_ads_source.not_null_stg_apple_search_ads__campaign_history_modified_at.f34a7a97c9": ["model.apple_search_ads_source.stg_apple_search_ads__campaign_history"], "test.apple_search_ads_source.not_null_stg_apple_search_ads__campaign_history_campaign_id.3f0f7502b8": ["model.apple_search_ads_source.stg_apple_search_ads__campaign_history"], "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__campaign_history_campaign_id__modified_at.317f970af9": ["model.apple_search_ads_source.stg_apple_search_ads__campaign_history"], "test.apple_search_ads_source.not_null_stg_apple_search_ads__campaign_report_campaign_id.b83941e728": ["model.apple_search_ads_source.stg_apple_search_ads__campaign_report"], "test.apple_search_ads_source.not_null_stg_apple_search_ads__campaign_report_date_day.c8dc10a6f3": ["model.apple_search_ads_source.stg_apple_search_ads__campaign_report"], "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__campaign_report_campaign_id__date_day.bad41b0481": ["model.apple_search_ads_source.stg_apple_search_ads__campaign_report"], "test.apple_search_ads_source.not_null_stg_apple_search_ads__keyword_history_modified_at.42fde5a287": ["model.apple_search_ads_source.stg_apple_search_ads__keyword_history"], "test.apple_search_ads_source.not_null_stg_apple_search_ads__keyword_history_keyword_id.889f83cfd2": ["model.apple_search_ads_source.stg_apple_search_ads__keyword_history"], "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__keyword_history_keyword_id__modified_at.7b06162d24": ["model.apple_search_ads_source.stg_apple_search_ads__keyword_history"], "test.apple_search_ads_source.not_null_stg_apple_search_ads__keyword_report_keyword_id.501725b09e": ["model.apple_search_ads_source.stg_apple_search_ads__keyword_report"], "test.apple_search_ads_source.not_null_stg_apple_search_ads__keyword_report_date_day.16098db928": ["model.apple_search_ads_source.stg_apple_search_ads__keyword_report"], "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__keyword_report_keyword_id__date_day.9f0099cff8": ["model.apple_search_ads_source.stg_apple_search_ads__keyword_report"], "test.apple_search_ads_source.not_null_stg_apple_search_ads__organization_organization_id.b013ce33cb": ["model.apple_search_ads_source.stg_apple_search_ads__organization"], "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__organization_organization_id.8647048f7a": ["model.apple_search_ads_source.stg_apple_search_ads__organization"], "test.apple_search_ads_source.not_null_stg_apple_search_ads__search_term_report__fivetran_id.aa430d1dad": ["model.apple_search_ads_source.stg_apple_search_ads__search_term_report"], "test.apple_search_ads_source.not_null_stg_apple_search_ads__search_term_report_date_day.fd93df3302": ["model.apple_search_ads_source.stg_apple_search_ads__search_term_report"], "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__search_term_report__fivetran_id__date_day.aad2a48344": ["model.apple_search_ads_source.stg_apple_search_ads__search_term_report"], "source.apple_search_ads_source.apple_search_ads.ad_group_history": [], "source.apple_search_ads_source.apple_search_ads.ad_group_report": [], "source.apple_search_ads_source.apple_search_ads.ad_history": [], "source.apple_search_ads_source.apple_search_ads.ad_level_report": [], "source.apple_search_ads_source.apple_search_ads.campaign_history": [], "source.apple_search_ads_source.apple_search_ads.campaign_report": [], "source.apple_search_ads_source.apple_search_ads.keyword_history": [], "source.apple_search_ads_source.apple_search_ads.keyword_report": [], "source.apple_search_ads_source.apple_search_ads.organization": [], "source.apple_search_ads_source.apple_search_ads.search_term_report": []}, "child_map": {"seed.apple_search_ads_integration_tests.ad_group_report_data": [], "seed.apple_search_ads_integration_tests.ad_report_data": [], "seed.apple_search_ads_integration_tests.keyword_report_data": [], "seed.apple_search_ads_integration_tests.ad_history_data": [], "seed.apple_search_ads_integration_tests.ad_group_history_data": [], "seed.apple_search_ads_integration_tests.campaign_history_data": [], "seed.apple_search_ads_integration_tests.campaign_report_data": [], "seed.apple_search_ads_integration_tests.keyword_history_data": [], "seed.apple_search_ads_integration_tests.search_term_report_data": [], "seed.apple_search_ads_integration_tests.organization_data": [], "model.apple_search_ads.apple_search_ads__ad_report": ["test.apple_search_ads.dbt_utils_unique_combination_of_columns_apple_search_ads__ad_report_organization_id__campaign_id__ad_group_id__ad_id__date_day.54e27817a1", "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__ad_group_report": ["test.apple_search_ads.dbt_utils_unique_combination_of_columns_apple_search_ads__ad_group_report_organization_id__campaign_id__ad_group_id__date_day.19d180bab9", "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.apple_search_ads__keyword_report": ["test.apple_search_ads.dbt_utils_unique_combination_of_columns_apple_search_ads__keyword_report_organization_id__campaign_id__ad_group_id__keyword_id__date_day.78fb033a13", "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__search_term_report": ["test.apple_search_ads.dbt_utils_unique_combination_of_columns_apple_search_ads__search_term_report_search_term_text__date_day.e60fe79ec4", "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__campaign_report": ["test.apple_search_ads.dbt_utils_unique_combination_of_columns_apple_search_ads__campaign_report_organization_id__campaign_id__date_day.647e56213f", "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": ["test.apple_search_ads.dbt_utils_unique_combination_of_columns_apple_search_ads__organization_report_organization_id__date_day.8bc84fccc3", "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_source.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_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__campaign_history_campaign_id__modified_at.317f970af9", "test.apple_search_ads_source.not_null_stg_apple_search_ads__campaign_history_campaign_id.3f0f7502b8", "test.apple_search_ads_source.not_null_stg_apple_search_ads__campaign_history_modified_at.f34a7a97c9"], "model.apple_search_ads_source.stg_apple_search_ads__ad_report": ["model.apple_search_ads.apple_search_ads__ad_report", "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__ad_report_ad_id__date_day__ad_group_id.0d8d23c516", "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_report_ad_group_id.a397755e9f", "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_report_ad_id.d08e760c58", "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_report_date_day.e6252346d8"], "model.apple_search_ads_source.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_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__campaign_report_campaign_id__date_day.bad41b0481", "test.apple_search_ads_source.not_null_stg_apple_search_ads__campaign_report_campaign_id.b83941e728", "test.apple_search_ads_source.not_null_stg_apple_search_ads__campaign_report_date_day.c8dc10a6f3"], "model.apple_search_ads_source.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_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__organization_organization_id.8647048f7a", "test.apple_search_ads_source.not_null_stg_apple_search_ads__organization_organization_id.b013ce33cb"], "model.apple_search_ads_source.stg_apple_search_ads__keyword_report": ["model.apple_search_ads.apple_search_ads__keyword_report", "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__keyword_report_keyword_id__date_day.9f0099cff8", "test.apple_search_ads_source.not_null_stg_apple_search_ads__keyword_report_date_day.16098db928", "test.apple_search_ads_source.not_null_stg_apple_search_ads__keyword_report_keyword_id.501725b09e"], "model.apple_search_ads_source.stg_apple_search_ads__keyword_history": ["model.apple_search_ads.apple_search_ads__keyword_report", "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__keyword_history_keyword_id__modified_at.7b06162d24", "test.apple_search_ads_source.not_null_stg_apple_search_ads__keyword_history_keyword_id.889f83cfd2", "test.apple_search_ads_source.not_null_stg_apple_search_ads__keyword_history_modified_at.42fde5a287"], "model.apple_search_ads_source.stg_apple_search_ads__search_term_report": ["model.apple_search_ads.apple_search_ads__search_term_report", "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__search_term_report__fivetran_id__date_day.aad2a48344", "test.apple_search_ads_source.not_null_stg_apple_search_ads__search_term_report__fivetran_id.aa430d1dad", "test.apple_search_ads_source.not_null_stg_apple_search_ads__search_term_report_date_day.fd93df3302"], "model.apple_search_ads_source.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_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__ad_group_history_ad_group_id__modified_at.84af14c83b", "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_group_history_ad_group_id.dc128eecb7", "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_group_history_modified_at.e5d65fa28f"], "model.apple_search_ads_source.stg_apple_search_ads__ad_history": ["model.apple_search_ads.apple_search_ads__ad_report", "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__ad_history_ad_id__modified_at.38599b8cba", "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_history_ad_id.4ad3bde32a", "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_history_modified_at.2eea7e006d"], "model.apple_search_ads_source.stg_apple_search_ads__ad_group_report": ["model.apple_search_ads.apple_search_ads__ad_group_report", "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__ad_group_report_ad_group_id__date_day.a0fcc4e33c", "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_group_report_ad_group_id.a115f9cfc1", "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_group_report_date_day.4dfd46a43b"], "model.apple_search_ads_source.stg_apple_search_ads__search_term_report_tmp": ["model.apple_search_ads_source.stg_apple_search_ads__search_term_report", "model.apple_search_ads_source.stg_apple_search_ads__search_term_report"], "model.apple_search_ads_source.stg_apple_search_ads__campaign_history_tmp": ["model.apple_search_ads_source.stg_apple_search_ads__campaign_history", "model.apple_search_ads_source.stg_apple_search_ads__campaign_history"], "model.apple_search_ads_source.stg_apple_search_ads__keyword_history_tmp": ["model.apple_search_ads_source.stg_apple_search_ads__keyword_history", "model.apple_search_ads_source.stg_apple_search_ads__keyword_history"], "model.apple_search_ads_source.stg_apple_search_ads__ad_group_history_tmp": ["model.apple_search_ads_source.stg_apple_search_ads__ad_group_history", "model.apple_search_ads_source.stg_apple_search_ads__ad_group_history"], "model.apple_search_ads_source.stg_apple_search_ads__ad_group_report_tmp": ["model.apple_search_ads_source.stg_apple_search_ads__ad_group_report", "model.apple_search_ads_source.stg_apple_search_ads__ad_group_report"], "model.apple_search_ads_source.stg_apple_search_ads__ad_history_tmp": ["model.apple_search_ads_source.stg_apple_search_ads__ad_history", "model.apple_search_ads_source.stg_apple_search_ads__ad_history"], "model.apple_search_ads_source.stg_apple_search_ads__campaign_report_tmp": ["model.apple_search_ads_source.stg_apple_search_ads__campaign_report", "model.apple_search_ads_source.stg_apple_search_ads__campaign_report"], "model.apple_search_ads_source.stg_apple_search_ads__organization_tmp": ["model.apple_search_ads_source.stg_apple_search_ads__organization", "model.apple_search_ads_source.stg_apple_search_ads__organization"], "model.apple_search_ads_source.stg_apple_search_ads__keyword_report_tmp": ["model.apple_search_ads_source.stg_apple_search_ads__keyword_report", "model.apple_search_ads_source.stg_apple_search_ads__keyword_report"], "model.apple_search_ads_source.stg_apple_search_ads__ad_report_tmp": ["model.apple_search_ads_source.stg_apple_search_ads__ad_report", "model.apple_search_ads_source.stg_apple_search_ads__ad_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": [], "test.apple_search_ads.dbt_utils_unique_combination_of_columns_apple_search_ads__ad_group_report_organization_id__campaign_id__ad_group_id__date_day.19d180bab9": [], "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.dbt_utils_unique_combination_of_columns_apple_search_ads__ad_report_organization_id__campaign_id__ad_group_id__ad_id__date_day.54e27817a1": [], "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.dbt_utils_unique_combination_of_columns_apple_search_ads__campaign_report_organization_id__campaign_id__date_day.647e56213f": [], "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.dbt_utils_unique_combination_of_columns_apple_search_ads__keyword_report_organization_id__campaign_id__ad_group_id__keyword_id__date_day.78fb033a13": [], "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.dbt_utils_unique_combination_of_columns_apple_search_ads__organization_report_organization_id__date_day.8bc84fccc3": [], "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.dbt_utils_unique_combination_of_columns_apple_search_ads__search_term_report_search_term_text__date_day.e60fe79ec4": [], "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_group_history_modified_at.e5d65fa28f": [], "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_group_history_ad_group_id.dc128eecb7": [], "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__ad_group_history_ad_group_id__modified_at.84af14c83b": [], "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_group_report_ad_group_id.a115f9cfc1": [], "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_group_report_date_day.4dfd46a43b": [], "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__ad_group_report_ad_group_id__date_day.a0fcc4e33c": [], "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_history_modified_at.2eea7e006d": [], "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_history_ad_id.4ad3bde32a": [], "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__ad_history_ad_id__modified_at.38599b8cba": [], "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_report_date_day.e6252346d8": [], "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_report_ad_group_id.a397755e9f": [], "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_report_ad_id.d08e760c58": [], "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__ad_report_ad_id__date_day__ad_group_id.0d8d23c516": [], "test.apple_search_ads_source.not_null_stg_apple_search_ads__campaign_history_modified_at.f34a7a97c9": [], "test.apple_search_ads_source.not_null_stg_apple_search_ads__campaign_history_campaign_id.3f0f7502b8": [], "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__campaign_history_campaign_id__modified_at.317f970af9": [], "test.apple_search_ads_source.not_null_stg_apple_search_ads__campaign_report_campaign_id.b83941e728": [], "test.apple_search_ads_source.not_null_stg_apple_search_ads__campaign_report_date_day.c8dc10a6f3": [], "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__campaign_report_campaign_id__date_day.bad41b0481": [], "test.apple_search_ads_source.not_null_stg_apple_search_ads__keyword_history_modified_at.42fde5a287": [], "test.apple_search_ads_source.not_null_stg_apple_search_ads__keyword_history_keyword_id.889f83cfd2": [], "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__keyword_history_keyword_id__modified_at.7b06162d24": [], "test.apple_search_ads_source.not_null_stg_apple_search_ads__keyword_report_keyword_id.501725b09e": [], "test.apple_search_ads_source.not_null_stg_apple_search_ads__keyword_report_date_day.16098db928": [], "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__keyword_report_keyword_id__date_day.9f0099cff8": [], "test.apple_search_ads_source.not_null_stg_apple_search_ads__organization_organization_id.b013ce33cb": [], "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__organization_organization_id.8647048f7a": [], "test.apple_search_ads_source.not_null_stg_apple_search_ads__search_term_report__fivetran_id.aa430d1dad": [], "test.apple_search_ads_source.not_null_stg_apple_search_ads__search_term_report_date_day.fd93df3302": [], "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__search_term_report__fivetran_id__date_day.aad2a48344": [], "source.apple_search_ads_source.apple_search_ads.ad_group_history": ["model.apple_search_ads_source.stg_apple_search_ads__ad_group_history_tmp"], "source.apple_search_ads_source.apple_search_ads.ad_group_report": ["model.apple_search_ads_source.stg_apple_search_ads__ad_group_report_tmp"], "source.apple_search_ads_source.apple_search_ads.ad_history": ["model.apple_search_ads_source.stg_apple_search_ads__ad_history_tmp"], "source.apple_search_ads_source.apple_search_ads.ad_level_report": ["model.apple_search_ads_source.stg_apple_search_ads__ad_report_tmp"], "source.apple_search_ads_source.apple_search_ads.campaign_history": ["model.apple_search_ads_source.stg_apple_search_ads__campaign_history_tmp"], "source.apple_search_ads_source.apple_search_ads.campaign_report": ["model.apple_search_ads_source.stg_apple_search_ads__campaign_report_tmp"], "source.apple_search_ads_source.apple_search_ads.keyword_history": ["model.apple_search_ads_source.stg_apple_search_ads__keyword_history_tmp"], "source.apple_search_ads_source.apple_search_ads.keyword_report": ["model.apple_search_ads_source.stg_apple_search_ads__keyword_report_tmp"], "source.apple_search_ads_source.apple_search_ads.organization": ["model.apple_search_ads_source.stg_apple_search_ads__organization_tmp"], "source.apple_search_ads_source.apple_search_ads.search_term_report": ["model.apple_search_ads_source.stg_apple_search_ads__search_term_report_tmp"]}} \ No newline at end of file +{"metadata": {"dbt_schema_version": "https://schemas.getdbt.com/dbt/manifest/v7.json", "dbt_version": "1.3.0", "generated_at": "2022-10-25T20:13:51.046075Z", "invocation_id": "2191920f-7f18-410e-bf49-1ac3da176caa", "env": {}, "project_id": "b8a2464c562afb40124f0d47d8c7adc5", "user_id": "2bfa9082-ea6e-467b-abdc-d0514ab111d9", "send_anonymous_usage_stats": true, "adapter_type": "bigquery"}, "nodes": {"seed.apple_search_ads_integration_tests.ad_group_report_data": {"compiled": true, "resource_type": "seed", "depends_on": {"macros": [], "nodes": []}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "materialized": "seed", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {"modification_time": "timestamp", "start_time": "timestamp", "end_time": "timestamp", "creation_time": "timestamp", "_fivetran_synced": "timestamp"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "quote_columns": false, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests", "fqn": ["apple_search_ads_integration_tests", "ad_group_report_data"], "unique_id": "seed.apple_search_ads_integration_tests.ad_group_report_data", "raw_code": "", "language": "sql", "package_name": "apple_search_ads_integration_tests", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests", "path": "ad_group_report_data.csv", "original_file_path": "seeds/ad_group_report_data.csv", "name": "ad_group_report_data", "alias": "ad_group_report_data", "checksum": {"name": "sha256", "checksum": "135ee77ac9c3aa146d4f0281b04312c1034c271276f215b27145bb99f83534f5"}, "tags": [], "refs": [], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": null, "build_path": null, "deferred": false, "unrendered_config": {"quote_columns": "{{ true if target.type == 'redshift' else false }}", "column_types": {"modification_time": "timestamp", "start_time": "timestamp", "end_time": "timestamp", "creation_time": "timestamp", "_fivetran_synced": "timestamp"}}, "created_at": 1666728757.761806, "compiled_code": "", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`apple_search_ads_integration_tests`.`ad_group_report_data`"}, "seed.apple_search_ads_integration_tests.ad_report_data": {"compiled": true, "resource_type": "seed", "depends_on": {"macros": [], "nodes": []}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "materialized": "seed", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {"modification_time": "timestamp", "start_time": "timestamp", "end_time": "timestamp", "creation_time": "timestamp", "_fivetran_synced": "timestamp"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "quote_columns": false, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests", "fqn": ["apple_search_ads_integration_tests", "ad_report_data"], "unique_id": "seed.apple_search_ads_integration_tests.ad_report_data", "raw_code": "", "language": "sql", "package_name": "apple_search_ads_integration_tests", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests", "path": "ad_report_data.csv", "original_file_path": "seeds/ad_report_data.csv", "name": "ad_report_data", "alias": "ad_report_data", "checksum": {"name": "sha256", "checksum": "beef859bd11dd339082a3e8d23414c5da7e30ae75ade28736a3dbdf292627708"}, "tags": [], "refs": [], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": null, "build_path": null, "deferred": false, "unrendered_config": {"quote_columns": "{{ true if target.type == 'redshift' else false }}", "column_types": {"modification_time": "timestamp", "start_time": "timestamp", "end_time": "timestamp", "creation_time": "timestamp", "_fivetran_synced": "timestamp"}}, "created_at": 1666728757.7670012, "compiled_code": "", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`apple_search_ads_integration_tests`.`ad_report_data`"}, "seed.apple_search_ads_integration_tests.keyword_report_data": {"compiled": true, "resource_type": "seed", "depends_on": {"macros": [], "nodes": []}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "materialized": "seed", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {"modification_time": "timestamp", "start_time": "timestamp", "end_time": "timestamp", "creation_time": "timestamp", "_fivetran_synced": "timestamp"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "quote_columns": false, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests", "fqn": ["apple_search_ads_integration_tests", "keyword_report_data"], "unique_id": "seed.apple_search_ads_integration_tests.keyword_report_data", "raw_code": "", "language": "sql", "package_name": "apple_search_ads_integration_tests", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests", "path": "keyword_report_data.csv", "original_file_path": "seeds/keyword_report_data.csv", "name": "keyword_report_data", "alias": "keyword_report_data", "checksum": {"name": "sha256", "checksum": "6aafe7098ea6f18764856a6631b190de106462f83f8bb1d3c8fb91e2d3cfffee"}, "tags": [], "refs": [], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": null, "build_path": null, "deferred": false, "unrendered_config": {"quote_columns": "{{ true if target.type == 'redshift' else false }}", "column_types": {"modification_time": "timestamp", "start_time": "timestamp", "end_time": "timestamp", "creation_time": "timestamp", "_fivetran_synced": "timestamp"}}, "created_at": 1666728757.7681339, "compiled_code": "", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`apple_search_ads_integration_tests`.`keyword_report_data`"}, "seed.apple_search_ads_integration_tests.ad_history_data": {"compiled": true, "resource_type": "seed", "depends_on": {"macros": [], "nodes": []}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "materialized": "seed", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {"modification_time": "timestamp", "start_time": "timestamp", "end_time": "timestamp", "creation_time": "timestamp", "_fivetran_synced": "timestamp"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "quote_columns": false, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests", "fqn": ["apple_search_ads_integration_tests", "ad_history_data"], "unique_id": "seed.apple_search_ads_integration_tests.ad_history_data", "raw_code": "", "language": "sql", "package_name": "apple_search_ads_integration_tests", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests", "path": "ad_history_data.csv", "original_file_path": "seeds/ad_history_data.csv", "name": "ad_history_data", "alias": "ad_history_data", "checksum": {"name": "sha256", "checksum": "6b7e388b2b1ac23dd3f2e0cc1a781099a525e921a36da2fe83f52bd207066ea8"}, "tags": [], "refs": [], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": null, "build_path": null, "deferred": false, "unrendered_config": {"quote_columns": "{{ true if target.type == 'redshift' else false }}", "column_types": {"modification_time": "timestamp", "start_time": "timestamp", "end_time": "timestamp", "creation_time": "timestamp", "_fivetran_synced": "timestamp"}}, "created_at": 1666728757.769118, "compiled_code": "", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`apple_search_ads_integration_tests`.`ad_history_data`"}, "seed.apple_search_ads_integration_tests.ad_group_history_data": {"compiled": true, "resource_type": "seed", "depends_on": {"macros": [], "nodes": []}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "materialized": "seed", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {"modification_time": "timestamp", "start_time": "timestamp", "end_time": "timestamp", "creation_time": "timestamp", "_fivetran_synced": "timestamp"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "quote_columns": false, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests", "fqn": ["apple_search_ads_integration_tests", "ad_group_history_data"], "unique_id": "seed.apple_search_ads_integration_tests.ad_group_history_data", "raw_code": "", "language": "sql", "package_name": "apple_search_ads_integration_tests", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests", "path": "ad_group_history_data.csv", "original_file_path": "seeds/ad_group_history_data.csv", "name": "ad_group_history_data", "alias": "ad_group_history_data", "checksum": {"name": "sha256", "checksum": "a9cfeb9cc85210420753798963e582f647bc3fe966ef725b7d3cd061f65325c4"}, "tags": [], "refs": [], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": null, "build_path": null, "deferred": false, "unrendered_config": {"quote_columns": "{{ true if target.type == 'redshift' else false }}", "column_types": {"modification_time": "timestamp", "start_time": "timestamp", "end_time": "timestamp", "creation_time": "timestamp", "_fivetran_synced": "timestamp"}}, "created_at": 1666728757.770088, "compiled_code": "", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`apple_search_ads_integration_tests`.`ad_group_history_data`"}, "seed.apple_search_ads_integration_tests.campaign_history_data": {"compiled": true, "resource_type": "seed", "depends_on": {"macros": [], "nodes": []}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "materialized": "seed", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {"modification_time": "timestamp", "start_time": "timestamp", "end_time": "timestamp", "creation_time": "timestamp", "_fivetran_synced": "timestamp"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "quote_columns": false, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests", "fqn": ["apple_search_ads_integration_tests", "campaign_history_data"], "unique_id": "seed.apple_search_ads_integration_tests.campaign_history_data", "raw_code": "", "language": "sql", "package_name": "apple_search_ads_integration_tests", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests", "path": "campaign_history_data.csv", "original_file_path": "seeds/campaign_history_data.csv", "name": "campaign_history_data", "alias": "campaign_history_data", "checksum": {"name": "sha256", "checksum": "56fa1720930e88d590eb11b16d93d5c7e28e5f9bec57866047040a1a183ad3f3"}, "tags": [], "refs": [], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": null, "build_path": null, "deferred": false, "unrendered_config": {"quote_columns": "{{ true if target.type == 'redshift' else false }}", "column_types": {"modification_time": "timestamp", "start_time": "timestamp", "end_time": "timestamp", "creation_time": "timestamp", "_fivetran_synced": "timestamp"}}, "created_at": 1666728757.771062, "compiled_code": "", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`apple_search_ads_integration_tests`.`campaign_history_data`"}, "seed.apple_search_ads_integration_tests.campaign_report_data": {"compiled": true, "resource_type": "seed", "depends_on": {"macros": [], "nodes": []}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "materialized": "seed", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {"modification_time": "timestamp", "start_time": "timestamp", "end_time": "timestamp", "creation_time": "timestamp", "_fivetran_synced": "timestamp"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "quote_columns": false, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests", "fqn": ["apple_search_ads_integration_tests", "campaign_report_data"], "unique_id": "seed.apple_search_ads_integration_tests.campaign_report_data", "raw_code": "", "language": "sql", "package_name": "apple_search_ads_integration_tests", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests", "path": "campaign_report_data.csv", "original_file_path": "seeds/campaign_report_data.csv", "name": "campaign_report_data", "alias": "campaign_report_data", "checksum": {"name": "sha256", "checksum": "a4a374475156eb8d9ddc40c43cadbcc843efcf7a55180346d2d4b875c2791ab1"}, "tags": [], "refs": [], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": null, "build_path": null, "deferred": false, "unrendered_config": {"quote_columns": "{{ true if target.type == 'redshift' else false }}", "column_types": {"modification_time": "timestamp", "start_time": "timestamp", "end_time": "timestamp", "creation_time": "timestamp", "_fivetran_synced": "timestamp"}}, "created_at": 1666728757.7721548, "compiled_code": "", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`apple_search_ads_integration_tests`.`campaign_report_data`"}, "seed.apple_search_ads_integration_tests.keyword_history_data": {"compiled": true, "resource_type": "seed", "depends_on": {"macros": [], "nodes": []}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "materialized": "seed", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {"modification_time": "timestamp", "start_time": "timestamp", "end_time": "timestamp", "creation_time": "timestamp", "_fivetran_synced": "timestamp"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "quote_columns": false, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests", "fqn": ["apple_search_ads_integration_tests", "keyword_history_data"], "unique_id": "seed.apple_search_ads_integration_tests.keyword_history_data", "raw_code": "", "language": "sql", "package_name": "apple_search_ads_integration_tests", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests", "path": "keyword_history_data.csv", "original_file_path": "seeds/keyword_history_data.csv", "name": "keyword_history_data", "alias": "keyword_history_data", "checksum": {"name": "sha256", "checksum": "9ad23801ae95fc44211fac6c893f67825e34df0e6ba4e967eeb4fe5c3391b86b"}, "tags": [], "refs": [], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": null, "build_path": null, "deferred": false, "unrendered_config": {"quote_columns": "{{ true if target.type == 'redshift' else false }}", "column_types": {"modification_time": "timestamp", "start_time": "timestamp", "end_time": "timestamp", "creation_time": "timestamp", "_fivetran_synced": "timestamp"}}, "created_at": 1666728757.7731142, "compiled_code": "", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`apple_search_ads_integration_tests`.`keyword_history_data`"}, "seed.apple_search_ads_integration_tests.search_term_report_data": {"compiled": true, "resource_type": "seed", "depends_on": {"macros": [], "nodes": []}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "materialized": "seed", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {"modification_time": "timestamp", "start_time": "timestamp", "end_time": "timestamp", "creation_time": "timestamp", "_fivetran_synced": "timestamp"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "quote_columns": false, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests", "fqn": ["apple_search_ads_integration_tests", "search_term_report_data"], "unique_id": "seed.apple_search_ads_integration_tests.search_term_report_data", "raw_code": "", "language": "sql", "package_name": "apple_search_ads_integration_tests", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests", "path": "search_term_report_data.csv", "original_file_path": "seeds/search_term_report_data.csv", "name": "search_term_report_data", "alias": "search_term_report_data", "checksum": {"name": "sha256", "checksum": "6add75b68a0f9a6f153a9fb83a682387a76a5b89d6dcd14fdbbcb5b418bb3b5a"}, "tags": [], "refs": [], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": null, "build_path": null, "deferred": false, "unrendered_config": {"quote_columns": "{{ true if target.type == 'redshift' else false }}", "column_types": {"modification_time": "timestamp", "start_time": "timestamp", "end_time": "timestamp", "creation_time": "timestamp", "_fivetran_synced": "timestamp"}}, "created_at": 1666728757.7740648, "compiled_code": "", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`apple_search_ads_integration_tests`.`search_term_report_data`"}, "seed.apple_search_ads_integration_tests.organization_data": {"compiled": true, "resource_type": "seed", "depends_on": {"macros": [], "nodes": []}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "materialized": "seed", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {"modification_time": "timestamp", "start_time": "timestamp", "end_time": "timestamp", "creation_time": "timestamp", "_fivetran_synced": "timestamp"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "quote_columns": false, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests", "fqn": ["apple_search_ads_integration_tests", "organization_data"], "unique_id": "seed.apple_search_ads_integration_tests.organization_data", "raw_code": "", "language": "sql", "package_name": "apple_search_ads_integration_tests", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests", "path": "organization_data.csv", "original_file_path": "seeds/organization_data.csv", "name": "organization_data", "alias": "organization_data", "checksum": {"name": "sha256", "checksum": "bbb5878ab9c07bd1f391181a8321ea50476f37d25f36fd1d66e58d513336699c"}, "tags": [], "refs": [], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": null, "build_path": null, "deferred": false, "unrendered_config": {"quote_columns": "{{ true if target.type == 'redshift' else false }}", "column_types": {"modification_time": "timestamp", "start_time": "timestamp", "end_time": "timestamp", "creation_time": "timestamp", "_fivetran_synced": "timestamp"}}, "created_at": 1666728757.7750359, "compiled_code": "", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`apple_search_ads_integration_tests`.`organization_data`"}, "model.apple_search_ads.apple_search_ads__ad_report": {"compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.fivetran_utils.persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__ad_report", "model.apple_search_ads_source.stg_apple_search_ads__ad_history", "model.apple_search_ads_source.stg_apple_search_ads__ad_group_history", "model.apple_search_ads_source.stg_apple_search_ads__campaign_history", "model.apple_search_ads_source.stg_apple_search_ads__organization"]}, "config": {"enabled": true, "alias": null, "schema": "apple_search_ads", "database": null, "tags": [], "meta": {}, "materialized": "table", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests_apple_search_ads", "fqn": ["apple_search_ads", "apple_search_ads__ad_report"], "unique_id": "model.apple_search_ads.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 {{ var('ad_report') }}\n), \n\nad as (\n\n select * \n from {{ var('ad_history') }}\n where is_most_recent_record = True\n), \n\nad_group as (\n\n select * \n from {{ var('ad_group_history') }}\n where is_most_recent_record = True\n), \n\ncampaign as (\n\n select *\n from {{ var('campaign_history') }}\n where is_most_recent_record = True\n), \n\norganization as (\n\n select * \n from {{ var('organization') }}\n), \n\njoined as (\n\n select \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 ad.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,\n sum(report.redownloads) as redownloads,\n sum(report.new_downloads + report.redownloads) as total_downloads,\n sum(report.impressions) as impressions,\n sum(report.spend) as spend\n\n {{ fivetran_utils.persist_pass_through_columns(pass_through_variable='apple_search_ads__ad_passthrough_metrics', transform = 'sum') }}\n from report\n join ad \n on report.ad_id = ad.ad_id\n join ad_group \n on report.ad_group_id = ad_group.ad_group_id\n join campaign \n on report.campaign_id = campaign.campaign_id\n join organization \n on ad.organization_id = organization.organization_id\n {{ dbt_utils.group_by(11) }}\n)\n\nselect * \nfrom joined", "language": "sql", "package_name": "apple_search_ads", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads", "path": "apple_search_ads__ad_report.sql", "original_file_path": "models/apple_search_ads__ad_report.sql", "name": "apple_search_ads__ad_report", "alias": "apple_search_ads__ad_report", "checksum": {"name": "sha256", "checksum": "9be99b8581d2c85b4b11327ae3eef34d26121ed866e5762ff7f627b2c24b63a9"}, "tags": [], "refs": [["stg_apple_search_ads__ad_report"], ["stg_apple_search_ads__ad_history"], ["stg_apple_search_ads__ad_group_history"], ["stg_apple_search_ads__campaign_history"], ["stg_apple_search_ads__organization"]], "sources": [], "metrics": [], "description": "Each record represents the daily ad performance of each ad.", "columns": {"organization_id": {"name": "organization_id", "description": "Organization ID associated with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "organization_name": {"name": "organization_name", "description": "Organization name associated with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_id": {"name": "campaign_id", "description": "Campaign ID associated with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_name": {"name": "campaign_name", "description": "Campaign name associated with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "ad_group_id": {"name": "ad_group_id", "description": "Ad group ID associated with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "ad_group_name": {"name": "ad_group_name", "description": "Ad group name associated with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "ad_id": {"name": "ad_id", "description": "Ad ID associated with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "ad_name": {"name": "ad_name", "description": "Ad name associated with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "ad_status": {"name": "ad_status", "description": "The status of the ad associated with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "date_day": {"name": "date_day", "description": "Date of the report.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "currency": {"name": "currency", "description": "This currency value should match the respective organization's currency value.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "taps": {"name": "taps", "description": "Number of taps on ad group on given day.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "new_downloads": {"name": "new_downloads", "description": "App downloads from new users who have never before installed app of ad group in a given day.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "redownloads": {"name": "redownloads", "description": "Number of user downloads where user deletes app 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 of ad group in a given day.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_downloads": {"name": "total_downloads", "description": "The sum of new_downloads and redownloads.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "impressions": {"name": "impressions", "description": "The number of impressions of ad group in a given day.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "spend": {"name": "spend", "description": "The spend on ad group in the given day.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": "apple_search_ads://models/apple_search_ads.yml", "compiled_path": "target/compiled/apple_search_ads/models/apple_search_ads__ad_report.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "apple_search_ads", "materialized": "table", "enabled": true}, "created_at": 1666728757.966059, "compiled_code": "\n\nwith report as (\n\n select *\n from `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__ad_report`\n), \n\nad as (\n\n select * \n from `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__ad_history`\n where is_most_recent_record = True\n), \n\nad_group as (\n\n select * \n from `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__ad_group_history`\n where is_most_recent_record = True\n), \n\ncampaign as (\n\n select *\n from `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__campaign_history`\n where is_most_recent_record = True\n), \n\norganization as (\n\n select * \n from `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__organization`\n), \n\njoined as (\n\n select \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 ad.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,\n sum(report.redownloads) as redownloads,\n sum(report.new_downloads + report.redownloads) as total_downloads,\n sum(report.impressions) as impressions,\n sum(report.spend) as spend\n\n \n\n\n\n\n from report\n join ad \n on report.ad_id = ad.ad_id\n join ad_group \n on report.ad_group_id = ad_group.ad_group_id\n join campaign \n on report.campaign_id = campaign.campaign_id\n join organization \n on ad.organization_id = organization.organization_id\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": [], "relation_name": "`dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads`.`apple_search_ads__ad_report`"}, "model.apple_search_ads.apple_search_ads__ad_group_report": {"compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.fivetran_utils.persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__ad_group_report", "model.apple_search_ads_source.stg_apple_search_ads__ad_group_history", "model.apple_search_ads_source.stg_apple_search_ads__campaign_history", "model.apple_search_ads_source.stg_apple_search_ads__organization"]}, "config": {"enabled": true, "alias": null, "schema": "apple_search_ads", "database": null, "tags": [], "meta": {}, "materialized": "table", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests_apple_search_ads", "fqn": ["apple_search_ads", "apple_search_ads__ad_group_report"], "unique_id": "model.apple_search_ads.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 {{ var('ad_group_report') }}\n), \n\nad_group as (\n\n select * \n from {{ var('ad_group_history') }}\n where is_most_recent_record = True\n), \n\ncampaign as (\n\n select *\n from {{ var('campaign_history') }}\n where is_most_recent_record = True\n), \n\norganization as (\n\n select * \n from {{ var('organization') }}\n), \n\njoined as (\n\n select \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.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,\n sum(report.redownloads) as redownloads,\n sum(report.new_downloads + report.redownloads) as total_downloads,\n sum(report.impressions) as impressions,\n sum(report.spend) as spend\n\n {{ fivetran_utils.persist_pass_through_columns(pass_through_variable='apple_search_ads__ad_group_passthrough_metrics', transform = 'sum') }}\n from report\n join ad_group \n on report.ad_group_id = ad_group.ad_group_id\n join campaign \n on ad_group.campaign_id = campaign.campaign_id\n join organization \n on ad_group.organization_id = organization.organization_id\n {{ dbt_utils.group_by(11) }}\n)\n\nselect * \nfrom joined", "language": "sql", "package_name": "apple_search_ads", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads", "path": "apple_search_ads__ad_group_report.sql", "original_file_path": "models/apple_search_ads__ad_group_report.sql", "name": "apple_search_ads__ad_group_report", "alias": "apple_search_ads__ad_group_report", "checksum": {"name": "sha256", "checksum": "a1edd5d4e81de3dadca268c67fc1bee311cab1edc7efe48a494c7017c7acdc80"}, "tags": [], "refs": [["stg_apple_search_ads__ad_group_report"], ["stg_apple_search_ads__ad_group_history"], ["stg_apple_search_ads__campaign_history"], ["stg_apple_search_ads__organization"]], "sources": [], "metrics": [], "description": "Each record represents the daily ad performance of each ad group.", "columns": {"organization_id": {"name": "organization_id", "description": "Organization ID associated with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "organization_name": {"name": "organization_name", "description": "Organization name associated with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_id": {"name": "campaign_id", "description": "Campaign ID associated with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_name": {"name": "campaign_name", "description": "Campaign name associated with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "ad_group_id": {"name": "ad_group_id", "description": "Ad group ID associated with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "ad_group_name": {"name": "ad_group_name", "description": "Ad group name associated with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "ad_group_status": {"name": "ad_group_status", "description": "The status of the ad group associated with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "start_at": {"name": "start_at", "description": "The start timestamp for this ad group.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "end_at": {"name": "end_at", "description": "The end timestamp for this ad group.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "date_day": {"name": "date_day", "description": "Date of the report.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "currency": {"name": "currency", "description": "This currency value should match the respective organization's currency value.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "taps": {"name": "taps", "description": "Number of taps on ad group on given day.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "new_downloads": {"name": "new_downloads", "description": "App downloads from new users who have never before installed app of ad group in a given day.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "redownloads": {"name": "redownloads", "description": "Number of user downloads where user deletes app 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 of ad group in a given day.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_downloads": {"name": "total_downloads", "description": "The sum of new_downloads and redownloads.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "impressions": {"name": "impressions", "description": "The number of impressions of ad group in a given day.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "spend": {"name": "spend", "description": "The spend on ad group in the given day.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": "apple_search_ads://models/apple_search_ads.yml", "compiled_path": "target/compiled/apple_search_ads/models/apple_search_ads__ad_group_report.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "apple_search_ads", "materialized": "table", "enabled": true}, "created_at": 1666728757.962782, "compiled_code": "\n\nwith report as (\n\n select *\n from `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__ad_group_report`\n), \n\nad_group as (\n\n select * \n from `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__ad_group_history`\n where is_most_recent_record = True\n), \n\ncampaign as (\n\n select *\n from `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__campaign_history`\n where is_most_recent_record = True\n), \n\norganization as (\n\n select * \n from `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__organization`\n), \n\njoined as (\n\n select \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.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,\n sum(report.redownloads) as redownloads,\n sum(report.new_downloads + report.redownloads) as total_downloads,\n sum(report.impressions) as impressions,\n sum(report.spend) as spend\n\n \n\n\n\n\n from report\n join ad_group \n on report.ad_group_id = ad_group.ad_group_id\n join campaign \n on ad_group.campaign_id = campaign.campaign_id\n join organization \n on ad_group.organization_id = organization.organization_id\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": [], "relation_name": "`dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads`.`apple_search_ads__ad_group_report`"}, "model.apple_search_ads.apple_search_ads__keyword_report": {"compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.fivetran_utils.persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__keyword_report", "model.apple_search_ads_source.stg_apple_search_ads__keyword_history", "model.apple_search_ads_source.stg_apple_search_ads__ad_group_history", "model.apple_search_ads_source.stg_apple_search_ads__campaign_history", "model.apple_search_ads_source.stg_apple_search_ads__organization"]}, "config": {"enabled": true, "alias": null, "schema": "apple_search_ads", "database": null, "tags": [], "meta": {}, "materialized": "table", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests_apple_search_ads", "fqn": ["apple_search_ads", "apple_search_ads__keyword_report"], "unique_id": "model.apple_search_ads.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 {{ var('keyword_report') }}\n), \n\nkeyword as (\n\n select *\n from {{ var('keyword_history') }}\n where is_most_recent_record = True\n), \n\nad_group as (\n\n select *\n from {{ var('ad_group_history') }}\n where is_most_recent_record = True\n), \n\ncampaign as (\n\n select *\n from {{ var('campaign_history') }}\n where is_most_recent_record = True\n), \n\norganization as (\n\n select * \n from {{ var('organization') }}\n), \n\njoined as (\n\n select \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 keyword.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,\n sum(report.redownloads) as redownloads,\n sum(report.new_downloads + report.redownloads) as total_downloads,\n sum(report.impressions) as impressions,\n sum(report.spend) as spend\n\n {{ fivetran_utils.persist_pass_through_columns(pass_through_variable='apple_search_ads__keyword_passthrough_metrics', transform = 'sum') }}\n from report\n join keyword \n on report.keyword_id = keyword.keyword_id\n join ad_group \n on keyword.ad_group_id = ad_group.ad_group_id\n join campaign \n on ad_group.campaign_id = campaign.campaign_id\n join organization \n on ad_group.organization_id = organization.organization_id\n {{ dbt_utils.group_by(12) }}\n)\n\nselect * \nfrom joined", "language": "sql", "package_name": "apple_search_ads", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads", "path": "apple_search_ads__keyword_report.sql", "original_file_path": "models/apple_search_ads__keyword_report.sql", "name": "apple_search_ads__keyword_report", "alias": "apple_search_ads__keyword_report", "checksum": {"name": "sha256", "checksum": "91250ca8167dc8fee98582ff093d56a498b854e5c66a51325076191016bfb0e7"}, "tags": [], "refs": [["stg_apple_search_ads__keyword_report"], ["stg_apple_search_ads__keyword_history"], ["stg_apple_search_ads__ad_group_history"], ["stg_apple_search_ads__campaign_history"], ["stg_apple_search_ads__organization"]], "sources": [], "metrics": [], "description": "Each record represents the daily ad performance of each creative set.", "columns": {"organization_id": {"name": "organization_id", "description": "Organization ID associated with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "organization_name": {"name": "organization_name", "description": "Organization name associated with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_id": {"name": "campaign_id", "description": "Campaign ID associated with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_name": {"name": "campaign_name", "description": "Campaign name associated with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "ad_group_id": {"name": "ad_group_id", "description": "Ad group ID associated with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "ad_group_name": {"name": "ad_group_name", "description": "Ad group name associated with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "keyword_id": {"name": "keyword_id", "description": "Creative set name associatd with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "keyword_text": {"name": "keyword_text", "description": "Creative set ID associated with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "match_type": {"name": "match_type", "description": "Controls how ads are matched to user searches; EXACT or BROAD.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "date_day": {"name": "date_day", "description": "Date of the report.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "currency": {"name": "currency", "description": "This currency value should match the respective organization's currency value.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "keyword_status": {"name": "keyword_status", "description": "The status of the keyword associated with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "taps": {"name": "taps", "description": "Number of taps on keyword on given day.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "new_downloads": {"name": "new_downloads", "description": "App downloads from new users who have never before installed app of keyword in a given day.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "redownloads": {"name": "redownloads", "description": "Number of user downloads where user deletes app 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 of keyword in a given day.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_downloads": {"name": "total_downloads", "description": "The sum of new_downloads and redownloads.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "impressions": {"name": "impressions", "description": "The number of impressions of keyword in a given day.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "spend": {"name": "spend", "description": "The spend on keyword in the given day.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": "apple_search_ads://models/apple_search_ads.yml", "compiled_path": "target/compiled/apple_search_ads/models/apple_search_ads__keyword_report.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "apple_search_ads", "materialized": "table", "enabled": true}, "created_at": 1666728758.013998, "compiled_code": "\n\nwith report as (\n\n select *\n from `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__keyword_report`\n), \n\nkeyword as (\n\n select *\n from `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__keyword_history`\n where is_most_recent_record = True\n), \n\nad_group as (\n\n select *\n from `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__ad_group_history`\n where is_most_recent_record = True\n), \n\ncampaign as (\n\n select *\n from `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__campaign_history`\n where is_most_recent_record = True\n), \n\norganization as (\n\n select * \n from `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__organization`\n), \n\njoined as (\n\n select \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 keyword.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,\n sum(report.redownloads) as redownloads,\n sum(report.new_downloads + report.redownloads) as total_downloads,\n sum(report.impressions) as impressions,\n sum(report.spend) as spend\n\n \n\n\n\n\n from report\n join keyword \n on report.keyword_id = keyword.keyword_id\n join ad_group \n on keyword.ad_group_id = ad_group.ad_group_id\n join campaign \n on ad_group.campaign_id = campaign.campaign_id\n join organization \n on ad_group.organization_id = organization.organization_id\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": [], "relation_name": "`dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads`.`apple_search_ads__keyword_report`"}, "model.apple_search_ads.apple_search_ads__search_term_report": {"compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.fivetran_utils.persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__search_term_report", "model.apple_search_ads_source.stg_apple_search_ads__campaign_history", "model.apple_search_ads_source.stg_apple_search_ads__organization"]}, "config": {"enabled": true, "alias": null, "schema": "apple_search_ads", "database": null, "tags": [], "meta": {}, "materialized": "table", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests_apple_search_ads", "fqn": ["apple_search_ads", "apple_search_ads__search_term_report"], "unique_id": "model.apple_search_ads.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 {{ var('search_term_report') }}\n), \n\ncampaign as (\n\n select *\n from {{ var('campaign_history') }}\n where is_most_recent_record = True\n), \n\norganization as (\n\n select * \n from {{ var('organization') }}\n), \n\njoined as (\n\n select \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 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,\n sum(report.redownloads) as redownloads,\n sum(report.new_downloads + report.redownloads) as total_downloads,\n sum(report.impressions) as impressions,\n sum(report.spend) as spend\n\n {{ fivetran_utils.persist_pass_through_columns(pass_through_variable='apple_search_ads__search_term_passthrough_metrics', transform = 'sum') }}\n from report\n join campaign \n on report.campaign_id = campaign.campaign_id\n join organization \n on campaign.organization_id = organization.organization_id\n where report.search_term_text is not null\n {{ dbt_utils.group_by(12) }}\n)\n\nselect * \nfrom joined", "language": "sql", "package_name": "apple_search_ads", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads", "path": "apple_search_ads__search_term_report.sql", "original_file_path": "models/apple_search_ads__search_term_report.sql", "name": "apple_search_ads__search_term_report", "alias": "apple_search_ads__search_term_report", "checksum": {"name": "sha256", "checksum": "4827d710dac6b2e632dcf3ba421a8166d719d1ae59e98128736b8689cf4039a1"}, "tags": [], "refs": [["stg_apple_search_ads__search_term_report"], ["stg_apple_search_ads__campaign_history"], ["stg_apple_search_ads__organization"]], "sources": [], "metrics": [], "description": "Each record represents the daily ad performance of each search term, only includes records with search term values.", "columns": {"organization_id": {"name": "organization_id", "description": "Organization ID associated with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "organization_name": {"name": "organization_name", "description": "Organization name associated with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_id": {"name": "campaign_id", "description": "Campaign ID associated with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_name": {"name": "campaign_name", "description": "Campaign name associated with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "ad_group_id": {"name": "ad_group_id", "description": "Ad group ID associated with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "ad_group_name": {"name": "ad_group_name", "description": "Ad group name associated with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "match_type": {"name": "match_type", "description": "Controls how ads are matched to user searches; EXACT or BROAD.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "date_day": {"name": "date_day", "description": "Date of the report.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "search_term_text": {"name": "search_term_text", "description": "Search term text.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "currency": {"name": "currency", "description": "This currency value should match the respective organization's currency value.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "taps": {"name": "taps", "description": "Number of taps on organization on given day.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "new_downloads": {"name": "new_downloads", "description": "App downloads from new users who have never before installed app of organization in a given day.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "redownloads": {"name": "redownloads", "description": "Number of user downloads where user deletes app 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 of organization in a given day.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_downloads": {"name": "total_downloads", "description": "The sum of new_downloads and redownloads.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "impressions": {"name": "impressions", "description": "The number of impressions of organization in a given day.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "spend": {"name": "spend", "description": "The spend on organization in the given day.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": "apple_search_ads://models/apple_search_ads.yml", "compiled_path": "target/compiled/apple_search_ads/models/apple_search_ads__search_term_report.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "apple_search_ads", "materialized": "table", "enabled": true}, "created_at": 1666728758.017817, "compiled_code": "\n\nwith report as (\n\n select *\n from `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__search_term_report`\n), \n\ncampaign as (\n\n select *\n from `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__campaign_history`\n where is_most_recent_record = True\n), \n\norganization as (\n\n select * \n from `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__organization`\n), \n\njoined as (\n\n select \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 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,\n sum(report.redownloads) as redownloads,\n sum(report.new_downloads + report.redownloads) as total_downloads,\n sum(report.impressions) as impressions,\n sum(report.spend) as spend\n\n \n\n\n\n\n from report\n join campaign \n on report.campaign_id = campaign.campaign_id\n join organization \n on campaign.organization_id = organization.organization_id\n where report.search_term_text is not null\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": [], "relation_name": "`dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads`.`apple_search_ads__search_term_report`"}, "model.apple_search_ads.apple_search_ads__campaign_report": {"compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.fivetran_utils.persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__campaign_report", "model.apple_search_ads_source.stg_apple_search_ads__campaign_history", "model.apple_search_ads_source.stg_apple_search_ads__organization"]}, "config": {"enabled": true, "alias": null, "schema": "apple_search_ads", "database": null, "tags": [], "meta": {}, "materialized": "table", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests_apple_search_ads", "fqn": ["apple_search_ads", "apple_search_ads__campaign_report"], "unique_id": "model.apple_search_ads.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 {{ var('campaign_report') }}\n\n), \n\ncampaign as (\n\n select *\n from {{ var('campaign_history') }}\n where is_most_recent_record = True\n), \n\norganization as (\n\n select * \n from {{ var('organization') }}\n\n), \n\njoined as (\n\n select \n report.date_day,\n campaign.organization_id,\n organization.organization_name,\n campaign.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,\n sum(report.redownloads) as redownloads,\n sum(report.new_downloads + report.redownloads) as total_downloads,\n sum(report.impressions) as impressions,\n sum(report.spend) as spend\n\n {{ fivetran_utils.persist_pass_through_columns(pass_through_variable='apple_search_ads__campaign_passthrough_metrics', transform = 'sum') }}\n from report\n join campaign \n on report.campaign_id = campaign.campaign_id\n join organization \n on campaign.organization_id = organization.organization_id\n {{ dbt_utils.group_by(9) }}\n)\n\nselect * \nfrom joined", "language": "sql", "package_name": "apple_search_ads", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads", "path": "apple_search_ads__campaign_report.sql", "original_file_path": "models/apple_search_ads__campaign_report.sql", "name": "apple_search_ads__campaign_report", "alias": "apple_search_ads__campaign_report", "checksum": {"name": "sha256", "checksum": "d555ffbfe1f914afd50ba592ab961f1ebdb40a4d4315c0696f1c80738930080f"}, "tags": [], "refs": [["stg_apple_search_ads__campaign_report"], ["stg_apple_search_ads__campaign_history"], ["stg_apple_search_ads__organization"]], "sources": [], "metrics": [], "description": "Each record represents the daily ad performance of each campaign.", "columns": {"organization_id": {"name": "organization_id", "description": "Organization ID associated with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "organization_name": {"name": "organization_name", "description": "Organization name associated with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_id": {"name": "campaign_id", "description": "Campaign ID associated with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_name": {"name": "campaign_name", "description": "Campaign name associated with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_status": {"name": "campaign_status", "description": "The status of the campaign associted with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "start_at": {"name": "start_at", "description": "The start timestamp of this campaign.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "end_at": {"name": "end_at", "description": "The end timestamp of this campaign.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "date_day": {"name": "date_day", "description": "Date of the report.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "currency": {"name": "currency", "description": "This currency value should match the respective organization's currency value.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "taps": {"name": "taps", "description": "Number of taps on campaign on given day.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "new_downloads": {"name": "new_downloads", "description": "App downloads from new users who have never before installed app of campaign in a given day.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "redownloads": {"name": "redownloads", "description": "Number of user downloads where user deletes app 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 of campaign in a given day.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_downloads": {"name": "total_downloads", "description": "The sum of new_downloads and redownloads.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "impressions": {"name": "impressions", "description": "The number of impressions of campaign in a given day.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "spend": {"name": "spend", "description": "The spend on campaign in the given day.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": "apple_search_ads://models/apple_search_ads.yml", "compiled_path": "target/compiled/apple_search_ads/models/apple_search_ads__campaign_report.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "apple_search_ads", "materialized": "table", "enabled": true}, "created_at": 1666728758.011362, "compiled_code": "\n\nwith report as (\n \n select *\n from `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__campaign_report`\n\n), \n\ncampaign as (\n\n select *\n from `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__campaign_history`\n where is_most_recent_record = True\n), \n\norganization as (\n\n select * \n from `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__organization`\n\n), \n\njoined as (\n\n select \n report.date_day,\n campaign.organization_id,\n organization.organization_name,\n campaign.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,\n sum(report.redownloads) as redownloads,\n sum(report.new_downloads + report.redownloads) as total_downloads,\n sum(report.impressions) as impressions,\n sum(report.spend) as spend\n\n \n\n\n\n\n from report\n join campaign \n on report.campaign_id = campaign.campaign_id\n join organization \n on campaign.organization_id = organization.organization_id\n group by 1,2,3,4,5,6,7,8,9\n)\n\nselect * \nfrom joined", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads`.`apple_search_ads__campaign_report`"}, "model.apple_search_ads.apple_search_ads__organization_report": {"compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.fivetran_utils.persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__campaign_report", "model.apple_search_ads_source.stg_apple_search_ads__campaign_history", "model.apple_search_ads_source.stg_apple_search_ads__organization"]}, "config": {"enabled": true, "alias": null, "schema": "apple_search_ads", "database": null, "tags": [], "meta": {}, "materialized": "table", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests_apple_search_ads", "fqn": ["apple_search_ads", "apple_search_ads__organization_report"], "unique_id": "model.apple_search_ads.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 {{ var('campaign_report') }}\n), \n\ncampaign as (\n\n select *\n from {{ var('campaign_history') }}\n where is_most_recent_record = True\n), \n\norganization as (\n\n select * \n from {{ var('organization') }}\n), \n\njoined as (\n\n select \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,\n sum(report.redownloads) as redownloads,\n sum(report.new_downloads + report.redownloads) as total_downloads,\n sum(report.impressions) as impressions,\n sum(report.spend) as spend\n\n {{ fivetran_utils.persist_pass_through_columns(pass_through_variable='apple_search_ads__campaign_passthrough_metrics', transform = 'sum') }}\n from report\n join campaign \n on report.campaign_id = campaign.campaign_id\n join organization \n on campaign.organization_id = organization.organization_id\n {{ dbt_utils.group_by(4) }}\n)\n\nselect * \nfrom joined", "language": "sql", "package_name": "apple_search_ads", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads", "path": "apple_search_ads__organization_report.sql", "original_file_path": "models/apple_search_ads__organization_report.sql", "name": "apple_search_ads__organization_report", "alias": "apple_search_ads__organization_report", "checksum": {"name": "sha256", "checksum": "47084fe8809edaeeda722e20590b19c6488687d05ad654b8fef4a0021088e0a2"}, "tags": [], "refs": [["stg_apple_search_ads__campaign_report"], ["stg_apple_search_ads__campaign_history"], ["stg_apple_search_ads__organization"]], "sources": [], "metrics": [], "description": "Each record represents the daily ad performance of each organization.", "columns": {"organization_id": {"name": "organization_id", "description": "Organization ID associated with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "organization_name": {"name": "organization_name", "description": "Organization name associated with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "date_day": {"name": "date_day", "description": "Date of the report.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "currency": {"name": "currency", "description": "This currency value should match the respective organization's currency value.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "taps": {"name": "taps", "description": "Number of taps on organization on given day.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "new_downloads": {"name": "new_downloads", "description": "App downloads from new users who have never before installed app of organization in a given day.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "redownloads": {"name": "redownloads", "description": "Number of user downloads where user deletes app 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 of organization in a given day.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_downloads": {"name": "total_downloads", "description": "The sum of new_downloads and redownloads.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "impressions": {"name": "impressions", "description": "The number of impressions of organization in a given day.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "spend": {"name": "spend", "description": "The spend on organization in the given day.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": "apple_search_ads://models/apple_search_ads.yml", "compiled_path": "target/compiled/apple_search_ads/models/apple_search_ads__organization_report.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "apple_search_ads", "materialized": "table", "enabled": true}, "created_at": 1666728758.015523, "compiled_code": "\n\nwith report as (\n \n select *\n from `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__campaign_report`\n), \n\ncampaign as (\n\n select *\n from `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__campaign_history`\n where is_most_recent_record = True\n), \n\norganization as (\n\n select * \n from `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__organization`\n), \n\njoined as (\n\n select \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,\n sum(report.redownloads) as redownloads,\n sum(report.new_downloads + report.redownloads) as total_downloads,\n sum(report.impressions) as impressions,\n sum(report.spend) as spend\n\n \n\n\n\n\n from report\n join campaign \n on report.campaign_id = campaign.campaign_id\n join organization \n on campaign.organization_id = organization.organization_id\n group by 1,2,3,4\n)\n\nselect * \nfrom joined", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads`.`apple_search_ads__organization_report`"}, "model.apple_search_ads_source.stg_apple_search_ads__campaign_history": {"compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.apple_search_ads_source.get_campaign_history_columns", "macro.fivetran_utils.fill_staging_columns"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__campaign_history_tmp", "model.apple_search_ads_source.stg_apple_search_ads__campaign_history_tmp"]}, "config": {"enabled": true, "alias": null, "schema": "apple_search_ads_source", "database": null, "tags": [], "meta": {}, "materialized": "table", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "fqn": ["apple_search_ads_source", "stg_apple_search_ads__campaign_history"], "unique_id": "model.apple_search_ads_source.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 from base\n),\n\nfinal as (\n \n select\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", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "stg_apple_search_ads__campaign_history.sql", "original_file_path": "models/stg_apple_search_ads__campaign_history.sql", "name": "stg_apple_search_ads__campaign_history", "alias": "stg_apple_search_ads__campaign_history", "checksum": {"name": "sha256", "checksum": "294e54bc10f47e44786be1c445e764b49464643d75c0bf7a4fc3a38f3868e0de"}, "tags": [], "refs": [["stg_apple_search_ads__campaign_history_tmp"], ["stg_apple_search_ads__campaign_history_tmp"]], "sources": [], "metrics": [], "description": "Each record represents a version of a campaign in Apple Search Ads.", "columns": {"modified_at": {"name": "modified_at", "description": "Timestamp of when the campaign object was last modified.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "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, "quote": null, "tags": []}, "campaign_id": {"name": "campaign_id", "description": "Campaign ID associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "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, "quote": null, "tags": []}, "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, "quote": null, "tags": []}, "campaign_name": {"name": "campaign_name", "description": "Campaign name for the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "organization_id": {"name": "organization_id", "description": "Organization ID associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "status": {"name": "status", "description": "The current status of the campaign, values include ENABLED and PAUSED.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": "apple_search_ads_source://models/stg_apple_search_ads.yml", "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads__campaign_history.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "apple_search_ads_source", "materialized": "table", "enabled": true}, "created_at": 1666728758.082039, "compiled_code": "\n\nwith base as (\n\n select * \n from `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__campaign_history_tmp`\n),\n\nfields as (\n\n select\n \n \n \n end_time\n \n as \n \n end_time\n \n, \n \n \n id\n \n as \n \n id\n \n, \n \n \n modification_time\n \n as \n \n modification_time\n \n, \n \n \n name\n \n as \n \n name\n \n, \n \n \n organization_id\n \n as \n \n organization_id\n \n, \n \n \n start_time\n \n as \n \n start_time\n \n, \n \n \n status\n \n as \n \n status\n \n\n\n\n \n from base\n),\n\nfinal as (\n \n select\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": [], "relation_name": "`dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__campaign_history`"}, "model.apple_search_ads_source.stg_apple_search_ads__ad_report": {"compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.apple_search_ads_source.get_ad_level_report_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.fill_pass_through_columns"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__ad_report_tmp", "model.apple_search_ads_source.stg_apple_search_ads__ad_report_tmp"]}, "config": {"enabled": true, "alias": null, "schema": "apple_search_ads_source", "database": null, "tags": [], "meta": {}, "materialized": "table", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "fqn": ["apple_search_ads_source", "stg_apple_search_ads__ad_report"], "unique_id": "model.apple_search_ads_source.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 from base\n),\n\nfinal as (\n \n select \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 new_downloads,\n redownloads,\n taps\n\n {{ fivetran_utils.fill_pass_through_columns('apple_search_ads__ad_passthrough_metrics') }}\n from fields\n)\n\nselect *\nfrom final", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "stg_apple_search_ads__ad_report.sql", "original_file_path": "models/stg_apple_search_ads__ad_report.sql", "name": "stg_apple_search_ads__ad_report", "alias": "stg_apple_search_ads__ad_report", "checksum": {"name": "sha256", "checksum": "45019dc2d949eecadbbd9d4a052049a60dca00c32f726da678972fa8bdadd1f6"}, "tags": [], "refs": [["stg_apple_search_ads__ad_report_tmp"], ["stg_apple_search_ads__ad_report_tmp"]], "sources": [], "metrics": [], "description": "Each record represents the daily performance of an ad in Apple Search Ads.", "columns": {"date_day": {"name": "date_day", "description": "Date for daily report aggregation.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_id": {"name": "campaign_id", "description": "Campaign ID associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "ad_group_id": {"name": "ad_group_id", "description": "Ad group ID associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "ad_id": {"name": "ad_id", "description": "Ad ID associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "impressions": {"name": "impressions", "description": "Number of times your ad appeared in App Store search results.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "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, "quote": null, "tags": []}, "currency": {"name": "currency", "description": "This currency value should match the respective organization's currency value.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "new_downloads": {"name": "new_downloads", "description": "App downloads from new users who have never before installed the respective app.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "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.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "taps": {"name": "taps", "description": "The number of times ad was tapped by users within the reporting time period.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": "apple_search_ads_source://models/stg_apple_search_ads.yml", "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads__ad_report.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "apple_search_ads_source", "materialized": "table", "enabled": true}, "created_at": 1666728758.080736, "compiled_code": "\n\nwith base as (\n\n select * \n from `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__ad_report_tmp`\n),\n\nfields as (\n\n select\n \n \n \n ad_group_id\n \n as \n \n ad_group_id\n \n, \n \n \n ad_id\n \n as \n \n ad_id\n \n, \n \n \n campaign_id\n \n as \n \n campaign_id\n \n, \n \n \n date\n \n as \n \n date\n \n, \n \n \n impressions\n \n as \n \n impressions\n \n, \n \n \n local_spend_amount\n \n as \n \n local_spend_amount\n \n, \n \n \n local_spend_currency\n \n as \n \n local_spend_currency\n \n, \n \n \n new_downloads\n \n as \n \n new_downloads\n \n, \n \n \n redownloads\n \n as \n \n redownloads\n \n, \n \n \n taps\n \n as \n \n taps\n \n\n\n\n from base\n),\n\nfinal as (\n \n select \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 new_downloads,\n redownloads,\n taps\n\n \n\n\n\n\n from fields\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__ad_report`"}, "model.apple_search_ads_source.stg_apple_search_ads__campaign_report": {"compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.apple_search_ads_source.get_campaign_report_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.fill_pass_through_columns"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__campaign_report_tmp", "model.apple_search_ads_source.stg_apple_search_ads__campaign_report_tmp"]}, "config": {"enabled": true, "alias": null, "schema": "apple_search_ads_source", "database": null, "tags": [], "meta": {}, "materialized": "table", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "fqn": ["apple_search_ads_source", "stg_apple_search_ads__campaign_report"], "unique_id": "model.apple_search_ads_source.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 from base\n),\n\nfinal as (\n \n select \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 new_downloads,\n redownloads,\n taps\n\n {{ fivetran_utils.fill_pass_through_columns('apple_search_ads__campaign_passthrough_metrics') }}\n from fields\n)\n\nselect * \nfrom final", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "stg_apple_search_ads__campaign_report.sql", "original_file_path": "models/stg_apple_search_ads__campaign_report.sql", "name": "stg_apple_search_ads__campaign_report", "alias": "stg_apple_search_ads__campaign_report", "checksum": {"name": "sha256", "checksum": "c4681d203c58d68501b9d2d3a84fc28598e9705eb4cc7f4496be52e3209768d3"}, "tags": [], "refs": [["stg_apple_search_ads__campaign_report_tmp"], ["stg_apple_search_ads__campaign_report_tmp"]], "sources": [], "metrics": [], "description": "Each record represents the daily performance of a campaign in Apple Search Ads.", "columns": {"campaign_id": {"name": "campaign_id", "description": "Campaign ID associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "date_day": {"name": "date_day", "description": "Date for daily report aggregation.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "impressions": {"name": "impressions", "description": "Number of times your ad appeared in App Store search results.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "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, "quote": null, "tags": []}, "currency": {"name": "currency", "description": "This currency value should match the respective organization's currency value.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "new_downloads": {"name": "new_downloads", "description": "App downloads from new users who have never before installed the respective app.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "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.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "taps": {"name": "taps", "description": "The number of times ad was tapped by users within the reporting time period.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": "apple_search_ads_source://models/stg_apple_search_ads.yml", "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads__campaign_report.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "apple_search_ads_source", "materialized": "table", "enabled": true}, "created_at": 1666728758.0832498, "compiled_code": "\n\nwith base as (\n\n select * \n from `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__campaign_report_tmp`\n),\n\nfields as (\n\n select\n \n \n \n date\n \n as \n \n date\n \n, \n \n \n id\n \n as \n \n id\n \n, \n \n \n impressions\n \n as \n \n impressions\n \n, \n \n \n local_spend_amount\n \n as \n \n local_spend_amount\n \n, \n \n \n local_spend_currency\n \n as \n \n local_spend_currency\n \n, \n \n \n new_downloads\n \n as \n \n new_downloads\n \n, \n \n \n redownloads\n \n as \n \n redownloads\n \n, \n \n \n taps\n \n as \n \n taps\n \n\n\n\n from base\n),\n\nfinal as (\n \n select \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 new_downloads,\n redownloads,\n taps\n\n \n\n\n\n\n from fields\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__campaign_report`"}, "model.apple_search_ads_source.stg_apple_search_ads__organization": {"compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.apple_search_ads_source.get_organization_columns", "macro.fivetran_utils.fill_staging_columns"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__organization_tmp", "model.apple_search_ads_source.stg_apple_search_ads__organization_tmp"]}, "config": {"enabled": true, "alias": null, "schema": "apple_search_ads_source", "database": null, "tags": [], "meta": {}, "materialized": "table", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "fqn": ["apple_search_ads_source", "stg_apple_search_ads__organization"], "unique_id": "model.apple_search_ads_source.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 from base\n),\n\nfinal as (\n \n select \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", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "stg_apple_search_ads__organization.sql", "original_file_path": "models/stg_apple_search_ads__organization.sql", "name": "stg_apple_search_ads__organization", "alias": "stg_apple_search_ads__organization", "checksum": {"name": "sha256", "checksum": "24d3ee4e2d050e8ade0b3222ea535ed1837d2ea4265f00cf3f3b7b67a7a30dab"}, "tags": [], "refs": [["stg_apple_search_ads__organization_tmp"], ["stg_apple_search_ads__organization_tmp"]], "sources": [], "metrics": [], "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, "quote": null, "tags": []}, "currency": {"name": "currency", "description": "Specified currency for respective organization.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "payment_model": {"name": "payment_model", "description": "Values include 'LOC', 'PAYG' or (payment method hasn't been set).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "organization_name": {"name": "organization_name", "description": "Name of organization.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "time_zone": {"name": "time_zone", "description": "Organization default timezone; values can be ORTZ or UTC.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": "apple_search_ads_source://models/stg_apple_search_ads.yml", "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads__organization.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "apple_search_ads_source", "materialized": "table", "enabled": true}, "created_at": 1666728758.087004, "compiled_code": "\n\nwith base as (\n\n select * \n from `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__organization_tmp`\n),\n\nfields as (\n\n select\n \n \n \n currency\n \n as \n \n currency\n \n, \n \n \n id\n \n as \n \n id\n \n, \n \n \n name\n \n as \n \n name\n \n, \n \n \n payment_model\n \n as \n \n payment_model\n \n, \n \n \n time_zone\n \n as \n \n time_zone\n \n\n\n\n \n from base\n),\n\nfinal as (\n \n select \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": [], "relation_name": "`dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__organization`"}, "model.apple_search_ads_source.stg_apple_search_ads__keyword_report": {"compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.apple_search_ads_source.get_keyword_report_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.fill_pass_through_columns"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__keyword_report_tmp", "model.apple_search_ads_source.stg_apple_search_ads__keyword_report_tmp"]}, "config": {"enabled": true, "alias": null, "schema": "apple_search_ads_source", "database": null, "tags": [], "meta": {}, "materialized": "table", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "fqn": ["apple_search_ads_source", "stg_apple_search_ads__keyword_report"], "unique_id": "model.apple_search_ads_source.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 from base\n),\n\nfinal as (\n \n select \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 new_downloads,\n redownloads,\n taps\n\n {{ fivetran_utils.fill_pass_through_columns('apple_search_ads__keyword_passthrough_metrics') }}\n from fields\n)\n\nselect * \nfrom final", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "stg_apple_search_ads__keyword_report.sql", "original_file_path": "models/stg_apple_search_ads__keyword_report.sql", "name": "stg_apple_search_ads__keyword_report", "alias": "stg_apple_search_ads__keyword_report", "checksum": {"name": "sha256", "checksum": "087cf73b201edc946f1b30c28096f4d513aca817fc3e510cac05f28dc781c665"}, "tags": [], "refs": [["stg_apple_search_ads__keyword_report_tmp"], ["stg_apple_search_ads__keyword_report_tmp"]], "sources": [], "metrics": [], "description": "Each record represents the daily performance of a keyword in Apple Search Ads.", "columns": {"keyword_id": {"name": "keyword_id", "description": "Keyword ID associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "date_day": {"name": "date_day", "description": "Date for daily report aggregation.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "impressions": {"name": "impressions", "description": "Number of times your ad appeared in App Store search results.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "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, "quote": null, "tags": []}, "currency": {"name": "currency", "description": "This currency value should match the respective organization's currency value.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "new_downloads": {"name": "new_downloads", "description": "App downloads from new users who have never before installed the respective app.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "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.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "taps": {"name": "taps", "description": "The number of times ad was tapped by users within the reporting time period.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": "apple_search_ads_source://models/stg_apple_search_ads.yml", "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads__keyword_report.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "apple_search_ads_source", "materialized": "table", "enabled": true}, "created_at": 1666728758.086155, "compiled_code": "\n\nwith base as (\n\n select * \n from `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__keyword_report_tmp`\n),\n\nfields as (\n\n select\n \n \n \n date\n \n as \n \n date\n \n, \n \n \n id\n \n as \n \n id\n \n, \n \n \n impressions\n \n as \n \n impressions\n \n, \n \n \n local_spend_amount\n \n as \n \n local_spend_amount\n \n, \n \n \n local_spend_currency\n \n as \n \n local_spend_currency\n \n, \n \n \n new_downloads\n \n as \n \n new_downloads\n \n, \n \n \n redownloads\n \n as \n \n redownloads\n \n, \n \n \n taps\n \n as \n \n taps\n \n\n\n \n from base\n),\n\nfinal as (\n \n select \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 new_downloads,\n redownloads,\n taps\n\n \n\n\n\n\n from fields\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__keyword_report`"}, "model.apple_search_ads_source.stg_apple_search_ads__keyword_history": {"compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.apple_search_ads_source.get_keyword_history_columns", "macro.fivetran_utils.fill_staging_columns"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__keyword_history_tmp", "model.apple_search_ads_source.stg_apple_search_ads__keyword_history_tmp"]}, "config": {"enabled": true, "alias": null, "schema": "apple_search_ads_source", "database": null, "tags": [], "meta": {}, "materialized": "table", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "fqn": ["apple_search_ads_source", "stg_apple_search_ads__keyword_history"], "unique_id": "model.apple_search_ads_source.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 from base\n),\n\nfinal as (\n \n select \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", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "stg_apple_search_ads__keyword_history.sql", "original_file_path": "models/stg_apple_search_ads__keyword_history.sql", "name": "stg_apple_search_ads__keyword_history", "alias": "stg_apple_search_ads__keyword_history", "checksum": {"name": "sha256", "checksum": "5ee576e97a5fffaf97916376ca747fcb9389b6733d268f9b42308a8f244ade8e"}, "tags": [], "refs": [["stg_apple_search_ads__keyword_history_tmp"], ["stg_apple_search_ads__keyword_history_tmp"]], "sources": [], "metrics": [], "description": "Each record represents a version of a keyword in Apple Search Ads.", "columns": {"modified_at": {"name": "modified_at", "description": "Timestamp of when the keyword object was last modified.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "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, "quote": null, "tags": []}, "keyword_id": {"name": "keyword_id", "description": "Keyword ID associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_id": {"name": "campaign_id", "description": "Campaign ID associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "ad_group_id": {"name": "ad_group_id", "description": "Ad group ID associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "bid_amount": {"name": "bid_amount", "description": "The bid amount to display your ad for the matching text value.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "bid_currency": {"name": "bid_currency", "description": "This currency value should match the respective organization's currency value.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "match_type": {"name": "match_type", "description": "Controls how ads are matched to user searches; EXACT or BROAD.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "status": {"name": "status", "description": "The current status of the keyword, values include ENABLED and PAUSED.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "keyword_text": {"name": "keyword_text", "description": "The word or phrase to match in user searches, to show respective ad.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": "apple_search_ads_source://models/stg_apple_search_ads.yml", "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads__keyword_history.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "apple_search_ads_source", "materialized": "table", "enabled": true}, "created_at": 1666728758.0848188, "compiled_code": "\n\nwith base as (\n\n select * \n from `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__keyword_history_tmp`\n),\n\nfields as (\n\n select\n \n \n \n ad_group_id\n \n as \n \n ad_group_id\n \n, \n \n \n bid_amount\n \n as \n \n bid_amount\n \n, \n \n \n bid_currency\n \n as \n \n bid_currency\n \n, \n \n \n campaign_id\n \n as \n \n campaign_id\n \n, \n \n \n id\n \n as \n \n id\n \n, \n \n \n match_type\n \n as \n \n match_type\n \n, \n \n \n modification_time\n \n as \n \n modification_time\n \n, \n \n \n status\n \n as \n \n status\n \n, \n \n \n text\n \n as \n \n text\n \n\n\n\n \n from base\n),\n\nfinal as (\n \n select \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": [], "relation_name": "`dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__keyword_history`"}, "model.apple_search_ads_source.stg_apple_search_ads__search_term_report": {"compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.apple_search_ads_source.get_search_term_report_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.fill_pass_through_columns"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__search_term_report_tmp", "model.apple_search_ads_source.stg_apple_search_ads__search_term_report_tmp"]}, "config": {"enabled": true, "alias": null, "schema": "apple_search_ads_source", "database": null, "tags": [], "meta": {}, "materialized": "table", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "fqn": ["apple_search_ads_source", "stg_apple_search_ads__search_term_report"], "unique_id": "model.apple_search_ads_source.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 from base\n),\n\nfinal as (\n \n select \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 new_downloads,\n redownloads\n\n {{ fivetran_utils.fill_pass_through_columns('apple_search_ads__search_term_passthrough_metrics') }}\n from fields\n)\n\nselect * \nfrom final", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "stg_apple_search_ads__search_term_report.sql", "original_file_path": "models/stg_apple_search_ads__search_term_report.sql", "name": "stg_apple_search_ads__search_term_report", "alias": "stg_apple_search_ads__search_term_report", "checksum": {"name": "sha256", "checksum": "6345a092b669f3283eb8b09b8590cdcf4e89da7ac486c18bb626315fac6db0e0"}, "tags": [], "refs": [["stg_apple_search_ads__search_term_report_tmp"], ["stg_apple_search_ads__search_term_report_tmp"]], "sources": [], "metrics": [], "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, "quote": null, "tags": []}, "ad_group_id": {"name": "ad_group_id", "description": "Ad group ID associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "ad_format": {"name": "ad_format", "description": "Format of creative set.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_id": {"name": "campaign_id", "description": "Campaign ID associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "date_day": {"name": "date_day", "description": "Date for daily report aggregation.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "ad_group_name": {"name": "ad_group_name", "description": "Ad group name.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "bid_amount": {"name": "bid_amount", "description": "The bid amount to display your ad for the matching text value.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "bid_currency": {"name": "bid_currency", "description": "This currency value should match the respective organization's currency value.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "keyword_text": {"name": "keyword_text", "description": "The word or phrase to match in user searches, to show respective ad.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "keyword_display_status": {"name": "keyword_display_status", "description": "The keyword display status can either be ACTIVE or PAUSED.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "keyword_id": {"name": "keyword_id", "description": "Keyword ID associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "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, "quote": null, "tags": []}, "currency": {"name": "currency", "description": "This currency value should match the respective organization's currency value.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "match_type": {"name": "match_type", "description": "Controls how ads are matched to user searches; values include EXACT, BROAD or AUTO.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "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, "quote": null, "tags": []}, "search_term_text": {"name": "search_term_text", "description": "The word or phrase to match of user searches.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "impressions": {"name": "impressions", "description": "Number of times your ad appeared in App Store search results.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "taps": {"name": "taps", "description": "The number of times ad was tapped by users within the reporting time period.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "new_downloads": {"name": "new_downloads", "description": "App downloads from new users who have never before installed the respective app.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "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.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": "apple_search_ads_source://models/stg_apple_search_ads.yml", "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads__search_term_report.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "apple_search_ads_source", "materialized": "table", "enabled": true}, "created_at": 1666728758.0897431, "compiled_code": "\n\nwith base as (\n\n select * \n from `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__search_term_report_tmp`\n),\n\nfields as (\n\n select\n \n \n \n _fivetran_id\n \n as \n \n _fivetran_id\n \n, \n \n \n ad_group_deleted\n \n as \n \n ad_group_deleted\n \n, \n \n \n ad_group_id\n \n as \n \n ad_group_id\n \n, \n \n \n ad_group_name\n \n as \n \n ad_group_name\n \n, \n \n \n bid_amount_amount\n \n as \n \n bid_amount_amount\n \n, \n \n \n bid_amount_currency\n \n as \n \n bid_amount_currency\n \n, \n \n \n campaign_id\n \n as \n \n campaign_id\n \n, \n \n \n date\n \n as \n \n date\n \n, \n \n \n deleted\n \n as \n \n deleted\n \n, \n \n \n impressions\n \n as \n \n impressions\n \n, \n \n \n keyword\n \n as \n \n keyword\n \n, \n \n \n keyword_display_status\n \n as \n \n keyword_display_status\n \n, \n \n \n keyword_id\n \n as \n \n keyword_id\n \n, \n \n \n local_spend_amount\n \n as \n \n local_spend_amount\n \n, \n \n \n local_spend_currency\n \n as \n \n local_spend_currency\n \n, \n \n \n match_type\n \n as \n \n match_type\n \n, \n \n \n new_downloads\n \n as \n \n new_downloads\n \n, \n \n \n redownloads\n \n as \n \n redownloads\n \n, \n \n \n search_term_source\n \n as \n \n search_term_source\n \n, \n \n \n search_term_text\n \n as \n \n search_term_text\n \n, \n \n \n taps\n \n as \n \n taps\n \n\n\n\n from base\n),\n\nfinal as (\n \n select \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 new_downloads,\n redownloads\n\n \n\n\n\n\n from fields\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__search_term_report`"}, "model.apple_search_ads_source.stg_apple_search_ads__ad_group_history": {"compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.apple_search_ads_source.get_ad_group_history_columns", "macro.fivetran_utils.fill_staging_columns"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__ad_group_history_tmp", "model.apple_search_ads_source.stg_apple_search_ads__ad_group_history_tmp"]}, "config": {"enabled": true, "alias": null, "schema": "apple_search_ads_source", "database": null, "tags": [], "meta": {}, "materialized": "table", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "fqn": ["apple_search_ads_source", "stg_apple_search_ads__ad_group_history"], "unique_id": "model.apple_search_ads_source.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 from base\n),\n\nfinal as (\n select \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", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "stg_apple_search_ads__ad_group_history.sql", "original_file_path": "models/stg_apple_search_ads__ad_group_history.sql", "name": "stg_apple_search_ads__ad_group_history", "alias": "stg_apple_search_ads__ad_group_history", "checksum": {"name": "sha256", "checksum": "b2081179706957545ca7818fd65e298a3948051372426039e2ecffd091fef371"}, "tags": [], "refs": [["stg_apple_search_ads__ad_group_history_tmp"], ["stg_apple_search_ads__ad_group_history_tmp"]], "sources": [], "metrics": [], "description": "Each record represents a version of an ad group in Apple Search Ads.", "columns": {"modified_at": {"name": "modified_at", "description": "Timestamp of when the ad group object was last modified.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "is_most_recent_record": {"name": "is_most_recent_record", "description": "Boolean indicating whether record was the most recent instance.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "ad_group_id": {"name": "ad_group_id", "description": "Ad group ID associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_id": {"name": "campaign_id", "description": "Campaign ID associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "start_at": {"name": "start_at", "description": "The designated ad group start time.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "end_at": {"name": "end_at", "description": "The designated ad group end time.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "ad_group_name": {"name": "ad_group_name", "description": "Ad group name.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "organization_id": {"name": "organization_id", "description": "Organization ID associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "status": {"name": "status", "description": "The current status of the ad group, values include ENABLED and PAUSED.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": "apple_search_ads_source://models/stg_apple_search_ads.yml", "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads__ad_group_history.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "apple_search_ads_source", "materialized": "table", "enabled": true}, "created_at": 1666728758.076621, "compiled_code": "\n\nwith base as (\n\n select * \n from `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__ad_group_history_tmp`\n),\n\nfields as (\n\n select\n \n \n \n campaign_id\n \n as \n \n campaign_id\n \n, \n \n \n end_time\n \n as \n \n end_time\n \n, \n \n \n id\n \n as \n \n id\n \n, \n \n \n modification_time\n \n as \n \n modification_time\n \n, \n \n \n name\n \n as \n \n name\n \n, \n \n \n organization_id\n \n as \n \n organization_id\n \n, \n \n \n start_time\n \n as \n \n start_time\n \n, \n \n \n status\n \n as \n \n status\n \n\n\n\n \n from base\n),\n\nfinal as (\n select \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": [], "relation_name": "`dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__ad_group_history`"}, "model.apple_search_ads_source.stg_apple_search_ads__ad_history": {"compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.apple_search_ads_source.get_ad_history_columns", "macro.fivetran_utils.fill_staging_columns"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__ad_history_tmp", "model.apple_search_ads_source.stg_apple_search_ads__ad_history_tmp"]}, "config": {"enabled": true, "alias": null, "schema": "apple_search_ads_source", "database": null, "tags": [], "meta": {}, "materialized": "table", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "fqn": ["apple_search_ads_source", "stg_apple_search_ads__ad_history"], "unique_id": "model.apple_search_ads_source.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 from base\n),\n\nfinal as (\n \n select \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", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "stg_apple_search_ads__ad_history.sql", "original_file_path": "models/stg_apple_search_ads__ad_history.sql", "name": "stg_apple_search_ads__ad_history", "alias": "stg_apple_search_ads__ad_history", "checksum": {"name": "sha256", "checksum": "4abb76f80d87af32ba976747bb0accf3b1641854a41a3e9d8ebec94533405d23"}, "tags": [], "refs": [["stg_apple_search_ads__ad_history_tmp"], ["stg_apple_search_ads__ad_history_tmp"]], "sources": [], "metrics": [], "description": "Each record represents a version of an ad in Apple Search Ads.", "columns": {"created_at": {"name": "created_at", "description": "Timestamp of when ad was created.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "modified_at": {"name": "modified_at", "description": "Timestamp of when the ad object was last modified.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "organization_id": {"name": "organization_id", "description": "Organization ID associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_id": {"name": "campaign_id", "description": "Campaign ID associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "ad_group_id": {"name": "ad_group_id", "description": "Ad group ID associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "ad_name": {"name": "ad_name", "description": "Ad name associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "ad_id": {"name": "ad_id", "description": "Ad ID associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "ad_status": {"name": "ad_status", "description": "The current status of the ad, values include ENABLED and PAUSED.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": "apple_search_ads_source://models/stg_apple_search_ads.yml", "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads__ad_history.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "apple_search_ads_source", "materialized": "table", "enabled": true}, "created_at": 1666728758.07919, "compiled_code": "\n\nwith base as (\n\n select * \n from `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__ad_history_tmp`\n),\n\nfields as (\n\n select\n \n \n \n ad_group_id\n \n as \n \n ad_group_id\n \n, \n \n \n campaign_id\n \n as \n \n campaign_id\n \n, \n \n \n creation_time\n \n as \n \n creation_time\n \n, \n \n \n id\n \n as \n \n id\n \n, \n \n \n modification_time\n \n as \n \n modification_time\n \n, \n \n \n name\n \n as \n \n name\n \n, \n \n \n org_id\n \n as \n \n org_id\n \n, \n \n \n status\n \n as \n \n status\n \n\n\n\n from base\n),\n\nfinal as (\n \n select \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": [], "relation_name": "`dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__ad_history`"}, "model.apple_search_ads_source.stg_apple_search_ads__ad_group_report": {"compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.apple_search_ads_source.get_ad_group_report_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.fill_pass_through_columns"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__ad_group_report_tmp", "model.apple_search_ads_source.stg_apple_search_ads__ad_group_report_tmp"]}, "config": {"enabled": true, "alias": null, "schema": "apple_search_ads_source", "database": null, "tags": [], "meta": {}, "materialized": "table", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "fqn": ["apple_search_ads_source", "stg_apple_search_ads__ad_group_report"], "unique_id": "model.apple_search_ads_source.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 from base\n),\n\nfinal as (\n \n select\n date as date_day, \n ad_group_id,\n impressions,\n local_spend_amount as spend,\n local_spend_currency as currency,\n new_downloads,\n redownloads,\n taps\n\n {{ fivetran_utils.fill_pass_through_columns('apple_search_ads__ad_group_passthrough_metrics') }}\n from fields\n)\n\nselect * \nfrom final", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "stg_apple_search_ads__ad_group_report.sql", "original_file_path": "models/stg_apple_search_ads__ad_group_report.sql", "name": "stg_apple_search_ads__ad_group_report", "alias": "stg_apple_search_ads__ad_group_report", "checksum": {"name": "sha256", "checksum": "a6f8f1e79e88e2512acd90e2768436ef73939e82acd46b79c0775ba19865147d"}, "tags": [], "refs": [["stg_apple_search_ads__ad_group_report_tmp"], ["stg_apple_search_ads__ad_group_report_tmp"]], "sources": [], "metrics": [], "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, "quote": null, "tags": []}, "date_day": {"name": "date_day", "description": "Date for daily report aggregation.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "impressions": {"name": "impressions", "description": "Number of times your ad appeared in App Store search results.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "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, "quote": null, "tags": []}, "currency": {"name": "currency", "description": "This currency value should match the respective organization's currency value.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "new_downloads": {"name": "new_downloads", "description": "App downloads from new users who have never before installed the respective app.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "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.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "taps": {"name": "taps", "description": "The number of times ad was tapped by users within the reporting time period.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": "apple_search_ads_source://models/stg_apple_search_ads.yml", "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads__ad_group_report.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "apple_search_ads_source", "materialized": "table", "enabled": true}, "created_at": 1666728758.0779579, "compiled_code": "\n\nwith base as (\n\n select * \n from `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__ad_group_report_tmp`\n),\n\nfields as (\n\n select\n \n \n \n ad_group_id\n \n as \n \n ad_group_id\n \n, \n \n \n date\n \n as \n \n date\n \n, \n \n \n impressions\n \n as \n \n impressions\n \n, \n \n \n local_spend_amount\n \n as \n \n local_spend_amount\n \n, \n \n \n local_spend_currency\n \n as \n \n local_spend_currency\n \n, \n \n \n new_downloads\n \n as \n \n new_downloads\n \n, \n \n \n redownloads\n \n as \n \n redownloads\n \n, \n \n \n taps\n \n as \n \n taps\n \n\n\n\n from base\n),\n\nfinal as (\n \n select\n date as date_day, \n ad_group_id,\n impressions,\n local_spend_amount as spend,\n local_spend_currency as currency,\n new_downloads,\n redownloads,\n taps\n\n \n\n\n\n\n from fields\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__ad_group_report`"}, "model.apple_search_ads_source.stg_apple_search_ads__search_term_report_tmp": {"compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars"], "nodes": ["source.apple_search_ads_source.apple_search_ads.search_term_report"]}, "config": {"enabled": true, "alias": null, "schema": "apple_search_ads_source", "database": null, "tags": [], "meta": {}, "materialized": "view", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "fqn": ["apple_search_ads_source", "tmp", "stg_apple_search_ads__search_term_report_tmp"], "unique_id": "model.apple_search_ads_source.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\nselect * \nfrom {{ var('search_term_report') }}", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "tmp/stg_apple_search_ads__search_term_report_tmp.sql", "original_file_path": "models/tmp/stg_apple_search_ads__search_term_report_tmp.sql", "name": "stg_apple_search_ads__search_term_report_tmp", "alias": "stg_apple_search_ads__search_term_report_tmp", "checksum": {"name": "sha256", "checksum": "86f6e99ff5c0373cf5ec106d4011966278601cb5350d588466564e2dca2fa951"}, "tags": [], "refs": [], "sources": [["apple_search_ads", "search_term_report"]], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/tmp/stg_apple_search_ads__search_term_report_tmp.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "apple_search_ads_source", "materialized": "view", "enabled": true}, "created_at": 1666728757.9189298, "compiled_code": "\n\nselect * \nfrom `dbt-package-testing`.`apple_search_ads_integration_tests`.`search_term_report_data`", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__search_term_report_tmp`"}, "model.apple_search_ads_source.stg_apple_search_ads__campaign_history_tmp": {"compiled": true, "resource_type": "model", "depends_on": {"macros": [], "nodes": ["source.apple_search_ads_source.apple_search_ads.campaign_history"]}, "config": {"enabled": true, "alias": null, "schema": "apple_search_ads_source", "database": null, "tags": [], "meta": {}, "materialized": "view", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "fqn": ["apple_search_ads_source", "tmp", "stg_apple_search_ads__campaign_history_tmp"], "unique_id": "model.apple_search_ads_source.stg_apple_search_ads__campaign_history_tmp", "raw_code": "{{ config(enabled=var('ad_reporting__apple_search_ads_enabled', True)) }}\n\nselect * \nfrom {{ var('campaign_history') }}", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "tmp/stg_apple_search_ads__campaign_history_tmp.sql", "original_file_path": "models/tmp/stg_apple_search_ads__campaign_history_tmp.sql", "name": "stg_apple_search_ads__campaign_history_tmp", "alias": "stg_apple_search_ads__campaign_history_tmp", "checksum": {"name": "sha256", "checksum": "e23c062d3d75b890a717ab4047e5a0dccf7c098b3927935df02f76c17acb3ea7"}, "tags": [], "refs": [], "sources": [["apple_search_ads", "campaign_history"]], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/tmp/stg_apple_search_ads__campaign_history_tmp.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "apple_search_ads_source", "materialized": "view", "enabled": true}, "created_at": 1666728757.922335, "compiled_code": "\n\nselect * \nfrom `dbt-package-testing`.`apple_search_ads_integration_tests`.`campaign_history_data`", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__campaign_history_tmp`"}, "model.apple_search_ads_source.stg_apple_search_ads__keyword_history_tmp": {"compiled": true, "resource_type": "model", "depends_on": {"macros": [], "nodes": ["source.apple_search_ads_source.apple_search_ads.keyword_history"]}, "config": {"enabled": true, "alias": null, "schema": "apple_search_ads_source", "database": null, "tags": [], "meta": {}, "materialized": "view", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "fqn": ["apple_search_ads_source", "tmp", "stg_apple_search_ads__keyword_history_tmp"], "unique_id": "model.apple_search_ads_source.stg_apple_search_ads__keyword_history_tmp", "raw_code": "{{ config(enabled=var('ad_reporting__apple_search_ads_enabled', True)) }}\n\nselect * \nfrom {{ var('keyword_history') }}", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "tmp/stg_apple_search_ads__keyword_history_tmp.sql", "original_file_path": "models/tmp/stg_apple_search_ads__keyword_history_tmp.sql", "name": "stg_apple_search_ads__keyword_history_tmp", "alias": "stg_apple_search_ads__keyword_history_tmp", "checksum": {"name": "sha256", "checksum": "852fa9ece91c72dd36f654ce0d71f2af4a1707385c0fa00e3d68e206e4ac456b"}, "tags": [], "refs": [], "sources": [["apple_search_ads", "keyword_history"]], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/tmp/stg_apple_search_ads__keyword_history_tmp.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "apple_search_ads_source", "materialized": "view", "enabled": true}, "created_at": 1666728757.926594, "compiled_code": "\n\nselect * \nfrom `dbt-package-testing`.`apple_search_ads_integration_tests`.`keyword_history_data`", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__keyword_history_tmp`"}, "model.apple_search_ads_source.stg_apple_search_ads__ad_group_history_tmp": {"compiled": true, "resource_type": "model", "depends_on": {"macros": [], "nodes": ["source.apple_search_ads_source.apple_search_ads.ad_group_history"]}, "config": {"enabled": true, "alias": null, "schema": "apple_search_ads_source", "database": null, "tags": [], "meta": {}, "materialized": "view", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "fqn": ["apple_search_ads_source", "tmp", "stg_apple_search_ads__ad_group_history_tmp"], "unique_id": "model.apple_search_ads_source.stg_apple_search_ads__ad_group_history_tmp", "raw_code": "{{ config(enabled=var('ad_reporting__apple_search_ads_enabled', True)) }}\n\nselect * \nfrom {{ var('ad_group_history') }}", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "tmp/stg_apple_search_ads__ad_group_history_tmp.sql", "original_file_path": "models/tmp/stg_apple_search_ads__ad_group_history_tmp.sql", "name": "stg_apple_search_ads__ad_group_history_tmp", "alias": "stg_apple_search_ads__ad_group_history_tmp", "checksum": {"name": "sha256", "checksum": "69317b26b7a3c109c0e5e61d7fdad053cb0549479a0dfdacd0d67ff0757cc97e"}, "tags": [], "refs": [], "sources": [["apple_search_ads", "ad_group_history"]], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/tmp/stg_apple_search_ads__ad_group_history_tmp.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "apple_search_ads_source", "materialized": "view", "enabled": true}, "created_at": 1666728757.9298391, "compiled_code": "\n\nselect * \nfrom `dbt-package-testing`.`apple_search_ads_integration_tests`.`ad_group_history_data`", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__ad_group_history_tmp`"}, "model.apple_search_ads_source.stg_apple_search_ads__ad_group_report_tmp": {"compiled": true, "resource_type": "model", "depends_on": {"macros": [], "nodes": ["source.apple_search_ads_source.apple_search_ads.ad_group_report"]}, "config": {"enabled": true, "alias": null, "schema": "apple_search_ads_source", "database": null, "tags": [], "meta": {}, "materialized": "view", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "fqn": ["apple_search_ads_source", "tmp", "stg_apple_search_ads__ad_group_report_tmp"], "unique_id": "model.apple_search_ads_source.stg_apple_search_ads__ad_group_report_tmp", "raw_code": "{{ config(enabled=var('ad_reporting__apple_search_ads_enabled', True)) }}\n\nselect * \nfrom {{ var('ad_group_report') }}", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "tmp/stg_apple_search_ads__ad_group_report_tmp.sql", "original_file_path": "models/tmp/stg_apple_search_ads__ad_group_report_tmp.sql", "name": "stg_apple_search_ads__ad_group_report_tmp", "alias": "stg_apple_search_ads__ad_group_report_tmp", "checksum": {"name": "sha256", "checksum": "91089253c95dee7d0aea3f9b8cc49cf343c2d06acf0de36641ebaef03e1d2b1b"}, "tags": [], "refs": [], "sources": [["apple_search_ads", "ad_group_report"]], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/tmp/stg_apple_search_ads__ad_group_report_tmp.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "apple_search_ads_source", "materialized": "view", "enabled": true}, "created_at": 1666728757.9330041, "compiled_code": "\n\nselect * \nfrom `dbt-package-testing`.`apple_search_ads_integration_tests`.`ad_group_report_data`", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__ad_group_report_tmp`"}, "model.apple_search_ads_source.stg_apple_search_ads__ad_history_tmp": {"compiled": true, "resource_type": "model", "depends_on": {"macros": [], "nodes": ["source.apple_search_ads_source.apple_search_ads.ad_history"]}, "config": {"enabled": true, "alias": null, "schema": "apple_search_ads_source", "database": null, "tags": [], "meta": {}, "materialized": "view", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "fqn": ["apple_search_ads_source", "tmp", "stg_apple_search_ads__ad_history_tmp"], "unique_id": "model.apple_search_ads_source.stg_apple_search_ads__ad_history_tmp", "raw_code": "{{ config(enabled=var('ad_reporting__apple_search_ads_enabled', True)) }}\n\nselect * \nfrom {{ var('ad_history') }}", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "tmp/stg_apple_search_ads__ad_history_tmp.sql", "original_file_path": "models/tmp/stg_apple_search_ads__ad_history_tmp.sql", "name": "stg_apple_search_ads__ad_history_tmp", "alias": "stg_apple_search_ads__ad_history_tmp", "checksum": {"name": "sha256", "checksum": "7b184af2299b7d42defa4606467cf9bf379e10cec768bf1e5825c040dbdfacb8"}, "tags": [], "refs": [], "sources": [["apple_search_ads", "ad_history"]], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/tmp/stg_apple_search_ads__ad_history_tmp.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "apple_search_ads_source", "materialized": "view", "enabled": true}, "created_at": 1666728757.9373372, "compiled_code": "\n\nselect * \nfrom `dbt-package-testing`.`apple_search_ads_integration_tests`.`ad_history_data`", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__ad_history_tmp`"}, "model.apple_search_ads_source.stg_apple_search_ads__campaign_report_tmp": {"compiled": true, "resource_type": "model", "depends_on": {"macros": [], "nodes": ["source.apple_search_ads_source.apple_search_ads.campaign_report"]}, "config": {"enabled": true, "alias": null, "schema": "apple_search_ads_source", "database": null, "tags": [], "meta": {}, "materialized": "view", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "fqn": ["apple_search_ads_source", "tmp", "stg_apple_search_ads__campaign_report_tmp"], "unique_id": "model.apple_search_ads_source.stg_apple_search_ads__campaign_report_tmp", "raw_code": "{{ config(enabled=var('ad_reporting__apple_search_ads_enabled', True)) }}\n\nselect * \nfrom {{ var('campaign_report') }}", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "tmp/stg_apple_search_ads__campaign_report_tmp.sql", "original_file_path": "models/tmp/stg_apple_search_ads__campaign_report_tmp.sql", "name": "stg_apple_search_ads__campaign_report_tmp", "alias": "stg_apple_search_ads__campaign_report_tmp", "checksum": {"name": "sha256", "checksum": "ae8d95be0097305356d0ba251d324d35bbe367edcf342c958f69fea9f89625f2"}, "tags": [], "refs": [], "sources": [["apple_search_ads", "campaign_report"]], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/tmp/stg_apple_search_ads__campaign_report_tmp.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "apple_search_ads_source", "materialized": "view", "enabled": true}, "created_at": 1666728757.9407349, "compiled_code": "\n\nselect * \nfrom `dbt-package-testing`.`apple_search_ads_integration_tests`.`campaign_report_data`", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__campaign_report_tmp`"}, "model.apple_search_ads_source.stg_apple_search_ads__organization_tmp": {"compiled": true, "resource_type": "model", "depends_on": {"macros": [], "nodes": ["source.apple_search_ads_source.apple_search_ads.organization"]}, "config": {"enabled": true, "alias": null, "schema": "apple_search_ads_source", "database": null, "tags": [], "meta": {}, "materialized": "view", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "fqn": ["apple_search_ads_source", "tmp", "stg_apple_search_ads__organization_tmp"], "unique_id": "model.apple_search_ads_source.stg_apple_search_ads__organization_tmp", "raw_code": "{{ config(enabled=var('ad_reporting__apple_search_ads_enabled', True)) }}\n\nselect * \nfrom {{ var('organization') }}", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "tmp/stg_apple_search_ads__organization_tmp.sql", "original_file_path": "models/tmp/stg_apple_search_ads__organization_tmp.sql", "name": "stg_apple_search_ads__organization_tmp", "alias": "stg_apple_search_ads__organization_tmp", "checksum": {"name": "sha256", "checksum": "4a62af784e819ec6034aa89fe16019f027c9994b192426e70bcf18bda3d117a9"}, "tags": [], "refs": [], "sources": [["apple_search_ads", "organization"]], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/tmp/stg_apple_search_ads__organization_tmp.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "apple_search_ads_source", "materialized": "view", "enabled": true}, "created_at": 1666728757.94374, "compiled_code": "\n\nselect * \nfrom `dbt-package-testing`.`apple_search_ads_integration_tests`.`organization_data`", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__organization_tmp`"}, "model.apple_search_ads_source.stg_apple_search_ads__keyword_report_tmp": {"compiled": true, "resource_type": "model", "depends_on": {"macros": [], "nodes": ["source.apple_search_ads_source.apple_search_ads.keyword_report"]}, "config": {"enabled": true, "alias": null, "schema": "apple_search_ads_source", "database": null, "tags": [], "meta": {}, "materialized": "view", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "fqn": ["apple_search_ads_source", "tmp", "stg_apple_search_ads__keyword_report_tmp"], "unique_id": "model.apple_search_ads_source.stg_apple_search_ads__keyword_report_tmp", "raw_code": "{{ config(enabled=var('ad_reporting__apple_search_ads_enabled', True)) }}\n\nselect * \nfrom {{ var('keyword_report') }}", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "tmp/stg_apple_search_ads__keyword_report_tmp.sql", "original_file_path": "models/tmp/stg_apple_search_ads__keyword_report_tmp.sql", "name": "stg_apple_search_ads__keyword_report_tmp", "alias": "stg_apple_search_ads__keyword_report_tmp", "checksum": {"name": "sha256", "checksum": "5009b770850f4f2648d5498a78b1491e6a44250d9ac2d7c08c249e8624f517f2"}, "tags": [], "refs": [], "sources": [["apple_search_ads", "keyword_report"]], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/tmp/stg_apple_search_ads__keyword_report_tmp.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "apple_search_ads_source", "materialized": "view", "enabled": true}, "created_at": 1666728757.946652, "compiled_code": "\n\nselect * \nfrom `dbt-package-testing`.`apple_search_ads_integration_tests`.`keyword_report_data`", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__keyword_report_tmp`"}, "model.apple_search_ads_source.stg_apple_search_ads__ad_report_tmp": {"compiled": true, "resource_type": "model", "depends_on": {"macros": [], "nodes": ["source.apple_search_ads_source.apple_search_ads.ad_level_report"]}, "config": {"enabled": true, "alias": null, "schema": "apple_search_ads_source", "database": null, "tags": [], "meta": {}, "materialized": "view", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "fqn": ["apple_search_ads_source", "tmp", "stg_apple_search_ads__ad_report_tmp"], "unique_id": "model.apple_search_ads_source.stg_apple_search_ads__ad_report_tmp", "raw_code": "{{ config(enabled=var('ad_reporting__apple_search_ads_enabled', True)) }}\n\nselect * \nfrom {{ var('ad_report') }}", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "tmp/stg_apple_search_ads__ad_report_tmp.sql", "original_file_path": "models/tmp/stg_apple_search_ads__ad_report_tmp.sql", "name": "stg_apple_search_ads__ad_report_tmp", "alias": "stg_apple_search_ads__ad_report_tmp", "checksum": {"name": "sha256", "checksum": "1744a47e20045a53726079456f5aba358e0292dd8a14d670e6ab7b2c30ece7ee"}, "tags": [], "refs": [], "sources": [["apple_search_ads", "ad_level_report"]], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/tmp/stg_apple_search_ads__ad_report_tmp.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "apple_search_ads_source", "materialized": "view", "enabled": true}, "created_at": 1666728757.950112, "compiled_code": "\n\nselect * \nfrom `dbt-package-testing`.`apple_search_ads_integration_tests`.`ad_report_data`", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__ad_report_tmp`"}, "test.apple_search_ads.not_null_apple_search_ads__ad_group_report_ad_group_id.60febec6b5": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "ad_group_id", "model": "{{ get_where_subquery(ref('apple_search_ads__ad_group_report')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads.apple_search_ads__ad_group_report"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads", "not_null_apple_search_ads__ad_group_report_ad_group_id"], "unique_id": "test.apple_search_ads.not_null_apple_search_ads__ad_group_report_ad_group_id.60febec6b5", "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "package_name": "apple_search_ads", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads", "path": "not_null_apple_search_ads__ad_group_report_ad_group_id.sql", "original_file_path": "models/apple_search_ads.yml", "name": "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": ""}, "tags": [], "refs": [["apple_search_ads__ad_group_report"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads/models/apple_search_ads.yml/not_null_apple_search_ads__ad_group_report_ad_group_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1666728758.021518, "compiled_code": "\n \n \n\n\n\nselect ad_group_id\nfrom `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads`.`apple_search_ads__ad_group_report`\nwhere ad_group_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "ad_group_id", "file_key_name": "models.apple_search_ads__ad_group_report"}, "test.apple_search_ads.not_null_apple_search_ads__ad_group_report_date_day.e6ffb30b3c": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('apple_search_ads__ad_group_report')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads.apple_search_ads__ad_group_report"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads", "not_null_apple_search_ads__ad_group_report_date_day"], "unique_id": "test.apple_search_ads.not_null_apple_search_ads__ad_group_report_date_day.e6ffb30b3c", "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "package_name": "apple_search_ads", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads", "path": "not_null_apple_search_ads__ad_group_report_date_day.sql", "original_file_path": "models/apple_search_ads.yml", "name": "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": ""}, "tags": [], "refs": [["apple_search_ads__ad_group_report"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads/models/apple_search_ads.yml/not_null_apple_search_ads__ad_group_report_date_day.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1666728758.022455, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads`.`apple_search_ads__ad_group_report`\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "date_day", "file_key_name": "models.apple_search_ads__ad_group_report"}, "test.apple_search_ads.dbt_utils_unique_combination_of_columns_apple_search_ads__ad_group_report_organization_id__campaign_id__ad_group_id__date_day.19d180bab9": {"test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["organization_id", "campaign_id", "ad_group_id", "date_day"], "model": "{{ get_where_subquery(ref('apple_search_ads__ad_group_report')) }}"}, "namespace": "dbt_utils"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_utils.test_unique_combination_of_columns", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads.apple_search_ads__ad_group_report"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_36b2ef766b4fc10b364ed4744c94afb2", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads", "dbt_utils_unique_combination_of_columns_apple_search_ads__ad_group_report_organization_id__campaign_id__ad_group_id__date_day"], "unique_id": "test.apple_search_ads.dbt_utils_unique_combination_of_columns_apple_search_ads__ad_group_report_organization_id__campaign_id__ad_group_id__date_day.19d180bab9", "raw_code": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_36b2ef766b4fc10b364ed4744c94afb2\") }}", "language": "sql", "package_name": "apple_search_ads", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads", "path": "dbt_utils_unique_combination_o_36b2ef766b4fc10b364ed4744c94afb2.sql", "original_file_path": "models/apple_search_ads.yml", "name": "dbt_utils_unique_combination_of_columns_apple_search_ads__ad_group_report_organization_id__campaign_id__ad_group_id__date_day", "alias": "dbt_utils_unique_combination_o_36b2ef766b4fc10b364ed4744c94afb2", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["apple_search_ads__ad_group_report"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads/models/apple_search_ads.yml/dbt_utils_unique_combination_o_36b2ef766b4fc10b364ed4744c94afb2.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_36b2ef766b4fc10b364ed4744c94afb2"}, "created_at": 1666728758.0232801, "compiled_code": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n organization_id, campaign_id, ad_group_id, date_day\n from `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads`.`apple_search_ads__ad_group_report`\n group by organization_id, campaign_id, ad_group_id, date_day\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": null, "file_key_name": "models.apple_search_ads__ad_group_report"}, "test.apple_search_ads.not_null_apple_search_ads__ad_report_ad_id.0ab2c5075c": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "ad_id", "model": "{{ get_where_subquery(ref('apple_search_ads__ad_report')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads.apple_search_ads__ad_report"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads", "not_null_apple_search_ads__ad_report_ad_id"], "unique_id": "test.apple_search_ads.not_null_apple_search_ads__ad_report_ad_id.0ab2c5075c", "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "package_name": "apple_search_ads", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads", "path": "not_null_apple_search_ads__ad_report_ad_id.sql", "original_file_path": "models/apple_search_ads.yml", "name": "not_null_apple_search_ads__ad_report_ad_id", "alias": "not_null_apple_search_ads__ad_report_ad_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["apple_search_ads__ad_report"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads/models/apple_search_ads.yml/not_null_apple_search_ads__ad_report_ad_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1666728758.029869, "compiled_code": "\n \n \n\n\n\nselect ad_id\nfrom `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads`.`apple_search_ads__ad_report`\nwhere ad_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "ad_id", "file_key_name": "models.apple_search_ads__ad_report"}, "test.apple_search_ads.not_null_apple_search_ads__ad_report_date_day.b86c049e17": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('apple_search_ads__ad_report')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads.apple_search_ads__ad_report"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads", "not_null_apple_search_ads__ad_report_date_day"], "unique_id": "test.apple_search_ads.not_null_apple_search_ads__ad_report_date_day.b86c049e17", "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "package_name": "apple_search_ads", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads", "path": "not_null_apple_search_ads__ad_report_date_day.sql", "original_file_path": "models/apple_search_ads.yml", "name": "not_null_apple_search_ads__ad_report_date_day", "alias": "not_null_apple_search_ads__ad_report_date_day", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["apple_search_ads__ad_report"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads/models/apple_search_ads.yml/not_null_apple_search_ads__ad_report_date_day.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1666728758.030839, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads`.`apple_search_ads__ad_report`\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "date_day", "file_key_name": "models.apple_search_ads__ad_report"}, "test.apple_search_ads.dbt_utils_unique_combination_of_columns_apple_search_ads__ad_report_organization_id__campaign_id__ad_group_id__ad_id__date_day.54e27817a1": {"test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["organization_id", "campaign_id", "ad_group_id", "ad_id", "date_day"], "model": "{{ get_where_subquery(ref('apple_search_ads__ad_report')) }}"}, "namespace": "dbt_utils"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_utils.test_unique_combination_of_columns", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads.apple_search_ads__ad_report"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_bd72aacf9db10be434541a5eb54a963c", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads", "dbt_utils_unique_combination_of_columns_apple_search_ads__ad_report_organization_id__campaign_id__ad_group_id__ad_id__date_day"], "unique_id": "test.apple_search_ads.dbt_utils_unique_combination_of_columns_apple_search_ads__ad_report_organization_id__campaign_id__ad_group_id__ad_id__date_day.54e27817a1", "raw_code": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_bd72aacf9db10be434541a5eb54a963c\") }}", "language": "sql", "package_name": "apple_search_ads", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads", "path": "dbt_utils_unique_combination_o_bd72aacf9db10be434541a5eb54a963c.sql", "original_file_path": "models/apple_search_ads.yml", "name": "dbt_utils_unique_combination_of_columns_apple_search_ads__ad_report_organization_id__campaign_id__ad_group_id__ad_id__date_day", "alias": "dbt_utils_unique_combination_o_bd72aacf9db10be434541a5eb54a963c", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["apple_search_ads__ad_report"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads/models/apple_search_ads.yml/dbt_utils_unique_combination_o_bd72aacf9db10be434541a5eb54a963c.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_bd72aacf9db10be434541a5eb54a963c"}, "created_at": 1666728758.031717, "compiled_code": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n organization_id, campaign_id, ad_group_id, ad_id, date_day\n from `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads`.`apple_search_ads__ad_report`\n group by organization_id, campaign_id, ad_group_id, ad_id, date_day\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": null, "file_key_name": "models.apple_search_ads__ad_report"}, "test.apple_search_ads.not_null_apple_search_ads__campaign_report_campaign_id.e26ed1e146": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "campaign_id", "model": "{{ get_where_subquery(ref('apple_search_ads__campaign_report')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads.apple_search_ads__campaign_report"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads", "not_null_apple_search_ads__campaign_report_campaign_id"], "unique_id": "test.apple_search_ads.not_null_apple_search_ads__campaign_report_campaign_id.e26ed1e146", "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "package_name": "apple_search_ads", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads", "path": "not_null_apple_search_ads__campaign_report_campaign_id.sql", "original_file_path": "models/apple_search_ads.yml", "name": "not_null_apple_search_ads__campaign_report_campaign_id", "alias": "not_null_apple_search_ads__campaign_report_campaign_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["apple_search_ads__campaign_report"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads/models/apple_search_ads.yml/not_null_apple_search_ads__campaign_report_campaign_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1666728758.034633, "compiled_code": "\n \n \n\n\n\nselect campaign_id\nfrom `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads`.`apple_search_ads__campaign_report`\nwhere campaign_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "campaign_id", "file_key_name": "models.apple_search_ads__campaign_report"}, "test.apple_search_ads.not_null_apple_search_ads__campaign_report_date_day.35652b8d1a": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('apple_search_ads__campaign_report')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads.apple_search_ads__campaign_report"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads", "not_null_apple_search_ads__campaign_report_date_day"], "unique_id": "test.apple_search_ads.not_null_apple_search_ads__campaign_report_date_day.35652b8d1a", "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "package_name": "apple_search_ads", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads", "path": "not_null_apple_search_ads__campaign_report_date_day.sql", "original_file_path": "models/apple_search_ads.yml", "name": "not_null_apple_search_ads__campaign_report_date_day", "alias": "not_null_apple_search_ads__campaign_report_date_day", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["apple_search_ads__campaign_report"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads/models/apple_search_ads.yml/not_null_apple_search_ads__campaign_report_date_day.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1666728758.035486, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads`.`apple_search_ads__campaign_report`\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "date_day", "file_key_name": "models.apple_search_ads__campaign_report"}, "test.apple_search_ads.dbt_utils_unique_combination_of_columns_apple_search_ads__campaign_report_organization_id__campaign_id__date_day.647e56213f": {"test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["organization_id", "campaign_id", "date_day"], "model": "{{ get_where_subquery(ref('apple_search_ads__campaign_report')) }}"}, "namespace": "dbt_utils"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_utils.test_unique_combination_of_columns", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads.apple_search_ads__campaign_report"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_3acbf89c4e0b6809bc53bfa9067d89c5", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads", "dbt_utils_unique_combination_of_columns_apple_search_ads__campaign_report_organization_id__campaign_id__date_day"], "unique_id": "test.apple_search_ads.dbt_utils_unique_combination_of_columns_apple_search_ads__campaign_report_organization_id__campaign_id__date_day.647e56213f", "raw_code": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_3acbf89c4e0b6809bc53bfa9067d89c5\") }}", "language": "sql", "package_name": "apple_search_ads", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads", "path": "dbt_utils_unique_combination_o_3acbf89c4e0b6809bc53bfa9067d89c5.sql", "original_file_path": "models/apple_search_ads.yml", "name": "dbt_utils_unique_combination_of_columns_apple_search_ads__campaign_report_organization_id__campaign_id__date_day", "alias": "dbt_utils_unique_combination_o_3acbf89c4e0b6809bc53bfa9067d89c5", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["apple_search_ads__campaign_report"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads/models/apple_search_ads.yml/dbt_utils_unique_combination_o_3acbf89c4e0b6809bc53bfa9067d89c5.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_3acbf89c4e0b6809bc53bfa9067d89c5"}, "created_at": 1666728758.036337, "compiled_code": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n organization_id, campaign_id, date_day\n from `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads`.`apple_search_ads__campaign_report`\n group by organization_id, campaign_id, date_day\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": null, "file_key_name": "models.apple_search_ads__campaign_report"}, "test.apple_search_ads.not_null_apple_search_ads__keyword_report_keyword_id.ea493710db": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "keyword_id", "model": "{{ get_where_subquery(ref('apple_search_ads__keyword_report')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads.apple_search_ads__keyword_report"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads", "not_null_apple_search_ads__keyword_report_keyword_id"], "unique_id": "test.apple_search_ads.not_null_apple_search_ads__keyword_report_keyword_id.ea493710db", "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "package_name": "apple_search_ads", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads", "path": "not_null_apple_search_ads__keyword_report_keyword_id.sql", "original_file_path": "models/apple_search_ads.yml", "name": "not_null_apple_search_ads__keyword_report_keyword_id", "alias": "not_null_apple_search_ads__keyword_report_keyword_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["apple_search_ads__keyword_report"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads/models/apple_search_ads.yml/not_null_apple_search_ads__keyword_report_keyword_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1666728758.03901, "compiled_code": "\n \n \n\n\n\nselect keyword_id\nfrom `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads`.`apple_search_ads__keyword_report`\nwhere keyword_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "keyword_id", "file_key_name": "models.apple_search_ads__keyword_report"}, "test.apple_search_ads.not_null_apple_search_ads__keyword_report_date_day.3dec8d0e82": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('apple_search_ads__keyword_report')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads.apple_search_ads__keyword_report"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads", "not_null_apple_search_ads__keyword_report_date_day"], "unique_id": "test.apple_search_ads.not_null_apple_search_ads__keyword_report_date_day.3dec8d0e82", "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "package_name": "apple_search_ads", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads", "path": "not_null_apple_search_ads__keyword_report_date_day.sql", "original_file_path": "models/apple_search_ads.yml", "name": "not_null_apple_search_ads__keyword_report_date_day", "alias": "not_null_apple_search_ads__keyword_report_date_day", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["apple_search_ads__keyword_report"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads/models/apple_search_ads.yml/not_null_apple_search_ads__keyword_report_date_day.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1666728758.040002, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads`.`apple_search_ads__keyword_report`\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "date_day", "file_key_name": "models.apple_search_ads__keyword_report"}, "test.apple_search_ads.dbt_utils_unique_combination_of_columns_apple_search_ads__keyword_report_organization_id__campaign_id__ad_group_id__keyword_id__date_day.78fb033a13": {"test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["organization_id", "campaign_id", "ad_group_id", "keyword_id", "date_day"], "model": "{{ get_where_subquery(ref('apple_search_ads__keyword_report')) }}"}, "namespace": "dbt_utils"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_utils.test_unique_combination_of_columns", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads.apple_search_ads__keyword_report"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_533c8551a101baa56c397525cb8a9246", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads", "dbt_utils_unique_combination_of_columns_apple_search_ads__keyword_report_organization_id__campaign_id__ad_group_id__keyword_id__date_day"], "unique_id": "test.apple_search_ads.dbt_utils_unique_combination_of_columns_apple_search_ads__keyword_report_organization_id__campaign_id__ad_group_id__keyword_id__date_day.78fb033a13", "raw_code": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_533c8551a101baa56c397525cb8a9246\") }}", "language": "sql", "package_name": "apple_search_ads", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads", "path": "dbt_utils_unique_combination_o_533c8551a101baa56c397525cb8a9246.sql", "original_file_path": "models/apple_search_ads.yml", "name": "dbt_utils_unique_combination_of_columns_apple_search_ads__keyword_report_organization_id__campaign_id__ad_group_id__keyword_id__date_day", "alias": "dbt_utils_unique_combination_o_533c8551a101baa56c397525cb8a9246", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["apple_search_ads__keyword_report"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads/models/apple_search_ads.yml/dbt_utils_unique_combination_o_533c8551a101baa56c397525cb8a9246.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_533c8551a101baa56c397525cb8a9246"}, "created_at": 1666728758.040858, "compiled_code": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n organization_id, campaign_id, ad_group_id, keyword_id, date_day\n from `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads`.`apple_search_ads__keyword_report`\n group by organization_id, campaign_id, ad_group_id, keyword_id, date_day\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": null, "file_key_name": "models.apple_search_ads__keyword_report"}, "test.apple_search_ads.not_null_apple_search_ads__organization_report_organization_id.b6cf7d69f8": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "organization_id", "model": "{{ get_where_subquery(ref('apple_search_ads__organization_report')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads.apple_search_ads__organization_report"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads", "not_null_apple_search_ads__organization_report_organization_id"], "unique_id": "test.apple_search_ads.not_null_apple_search_ads__organization_report_organization_id.b6cf7d69f8", "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "package_name": "apple_search_ads", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads", "path": "not_null_apple_search_ads__organization_report_organization_id.sql", "original_file_path": "models/apple_search_ads.yml", "name": "not_null_apple_search_ads__organization_report_organization_id", "alias": "not_null_apple_search_ads__organization_report_organization_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["apple_search_ads__organization_report"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads/models/apple_search_ads.yml/not_null_apple_search_ads__organization_report_organization_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1666728758.043932, "compiled_code": "\n \n \n\n\n\nselect organization_id\nfrom `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads`.`apple_search_ads__organization_report`\nwhere organization_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "organization_id", "file_key_name": "models.apple_search_ads__organization_report"}, "test.apple_search_ads.not_null_apple_search_ads__organization_report_date_day.5784fed523": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('apple_search_ads__organization_report')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads.apple_search_ads__organization_report"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads", "not_null_apple_search_ads__organization_report_date_day"], "unique_id": "test.apple_search_ads.not_null_apple_search_ads__organization_report_date_day.5784fed523", "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "package_name": "apple_search_ads", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads", "path": "not_null_apple_search_ads__organization_report_date_day.sql", "original_file_path": "models/apple_search_ads.yml", "name": "not_null_apple_search_ads__organization_report_date_day", "alias": "not_null_apple_search_ads__organization_report_date_day", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["apple_search_ads__organization_report"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads/models/apple_search_ads.yml/not_null_apple_search_ads__organization_report_date_day.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1666728758.044807, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads`.`apple_search_ads__organization_report`\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "date_day", "file_key_name": "models.apple_search_ads__organization_report"}, "test.apple_search_ads.dbt_utils_unique_combination_of_columns_apple_search_ads__organization_report_organization_id__date_day.8bc84fccc3": {"test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["organization_id", "date_day"], "model": "{{ get_where_subquery(ref('apple_search_ads__organization_report')) }}"}, "namespace": "dbt_utils"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_utils.test_unique_combination_of_columns", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads.apple_search_ads__organization_report"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_f2f453668a8bb7c0387ed85fc7bfaf2d", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads", "dbt_utils_unique_combination_of_columns_apple_search_ads__organization_report_organization_id__date_day"], "unique_id": "test.apple_search_ads.dbt_utils_unique_combination_of_columns_apple_search_ads__organization_report_organization_id__date_day.8bc84fccc3", "raw_code": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_f2f453668a8bb7c0387ed85fc7bfaf2d\") }}", "language": "sql", "package_name": "apple_search_ads", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads", "path": "dbt_utils_unique_combination_o_f2f453668a8bb7c0387ed85fc7bfaf2d.sql", "original_file_path": "models/apple_search_ads.yml", "name": "dbt_utils_unique_combination_of_columns_apple_search_ads__organization_report_organization_id__date_day", "alias": "dbt_utils_unique_combination_o_f2f453668a8bb7c0387ed85fc7bfaf2d", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["apple_search_ads__organization_report"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads/models/apple_search_ads.yml/dbt_utils_unique_combination_o_f2f453668a8bb7c0387ed85fc7bfaf2d.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_f2f453668a8bb7c0387ed85fc7bfaf2d"}, "created_at": 1666728758.045656, "compiled_code": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n organization_id, date_day\n from `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads`.`apple_search_ads__organization_report`\n group by organization_id, date_day\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": null, "file_key_name": "models.apple_search_ads__organization_report"}, "test.apple_search_ads.not_null_apple_search_ads__search_term_report_date_day.1bc3b0d57c": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('apple_search_ads__search_term_report')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads.apple_search_ads__search_term_report"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads", "not_null_apple_search_ads__search_term_report_date_day"], "unique_id": "test.apple_search_ads.not_null_apple_search_ads__search_term_report_date_day.1bc3b0d57c", "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "package_name": "apple_search_ads", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads", "path": "not_null_apple_search_ads__search_term_report_date_day.sql", "original_file_path": "models/apple_search_ads.yml", "name": "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": ""}, "tags": [], "refs": [["apple_search_ads__search_term_report"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads/models/apple_search_ads.yml/not_null_apple_search_ads__search_term_report_date_day.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1666728758.048388, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads`.`apple_search_ads__search_term_report`\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "date_day", "file_key_name": "models.apple_search_ads__search_term_report"}, "test.apple_search_ads.not_null_apple_search_ads__search_term_report_search_term_text.aecc7447f7": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "search_term_text", "model": "{{ get_where_subquery(ref('apple_search_ads__search_term_report')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads.apple_search_ads__search_term_report"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads", "not_null_apple_search_ads__search_term_report_search_term_text"], "unique_id": "test.apple_search_ads.not_null_apple_search_ads__search_term_report_search_term_text.aecc7447f7", "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "package_name": "apple_search_ads", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads", "path": "not_null_apple_search_ads__search_term_report_search_term_text.sql", "original_file_path": "models/apple_search_ads.yml", "name": "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": ""}, "tags": [], "refs": [["apple_search_ads__search_term_report"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads/models/apple_search_ads.yml/not_null_apple_search_ads__search_term_report_search_term_text.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1666728758.049206, "compiled_code": "\n \n \n\n\n\nselect search_term_text\nfrom `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads`.`apple_search_ads__search_term_report`\nwhere search_term_text is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "search_term_text", "file_key_name": "models.apple_search_ads__search_term_report"}, "test.apple_search_ads.dbt_utils_unique_combination_of_columns_apple_search_ads__search_term_report_search_term_text__date_day.e60fe79ec4": {"test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["search_term_text", "date_day"], "model": "{{ get_where_subquery(ref('apple_search_ads__search_term_report')) }}"}, "namespace": "dbt_utils"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_utils.test_unique_combination_of_columns", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads.apple_search_ads__search_term_report"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_7c3690db5ce751fbf1f2dff07b3a8690", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads", "dbt_utils_unique_combination_of_columns_apple_search_ads__search_term_report_search_term_text__date_day"], "unique_id": "test.apple_search_ads.dbt_utils_unique_combination_of_columns_apple_search_ads__search_term_report_search_term_text__date_day.e60fe79ec4", "raw_code": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_7c3690db5ce751fbf1f2dff07b3a8690\") }}", "language": "sql", "package_name": "apple_search_ads", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads", "path": "dbt_utils_unique_combination_o_7c3690db5ce751fbf1f2dff07b3a8690.sql", "original_file_path": "models/apple_search_ads.yml", "name": "dbt_utils_unique_combination_of_columns_apple_search_ads__search_term_report_search_term_text__date_day", "alias": "dbt_utils_unique_combination_o_7c3690db5ce751fbf1f2dff07b3a8690", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["apple_search_ads__search_term_report"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads/models/apple_search_ads.yml/dbt_utils_unique_combination_o_7c3690db5ce751fbf1f2dff07b3a8690.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_7c3690db5ce751fbf1f2dff07b3a8690"}, "created_at": 1666728758.050177, "compiled_code": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n search_term_text, date_day\n from `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads`.`apple_search_ads__search_term_report`\n group by search_term_text, date_day\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": null, "file_key_name": "models.apple_search_ads__search_term_report"}, "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_group_history_modified_at.e5d65fa28f": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "modified_at", "model": "{{ get_where_subquery(ref('stg_apple_search_ads__ad_group_history')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__ad_group_history"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads_source", "not_null_stg_apple_search_ads__ad_group_history_modified_at"], "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_group_history_modified_at.e5d65fa28f", "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "not_null_stg_apple_search_ads__ad_group_history_modified_at.sql", "original_file_path": "models/stg_apple_search_ads.yml", "name": "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": ""}, "tags": [], "refs": [["stg_apple_search_ads__ad_group_history"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads.yml/not_null_stg_apple_search_ads__ad_group_history_modified_at.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1666728758.090146, "compiled_code": "\n \n \n\n\n\nselect modified_at\nfrom `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__ad_group_history`\nwhere modified_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "modified_at", "file_key_name": "models.stg_apple_search_ads__ad_group_history"}, "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_group_history_ad_group_id.dc128eecb7": {"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}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__ad_group_history"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads_source", "not_null_stg_apple_search_ads__ad_group_history_ad_group_id"], "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_group_history_ad_group_id.dc128eecb7", "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "not_null_stg_apple_search_ads__ad_group_history_ad_group_id.sql", "original_file_path": "models/stg_apple_search_ads.yml", "name": "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": ""}, "tags": [], "refs": [["stg_apple_search_ads__ad_group_history"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads.yml/not_null_stg_apple_search_ads__ad_group_history_ad_group_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1666728758.091109, "compiled_code": "\n \n \n\n\n\nselect ad_group_id\nfrom `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__ad_group_history`\nwhere ad_group_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "ad_group_id", "file_key_name": "models.stg_apple_search_ads__ad_group_history"}, "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__ad_group_history_ad_group_id__modified_at.84af14c83b": {"test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["ad_group_id", "modified_at"], "model": "{{ get_where_subquery(ref('stg_apple_search_ads__ad_group_history')) }}"}, "namespace": "dbt_utils"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_utils.test_unique_combination_of_columns", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__ad_group_history"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_d82553a0f3b4daa8d59460c85a542d4f", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads_source", "dbt_utils_unique_combination_of_columns_stg_apple_search_ads__ad_group_history_ad_group_id__modified_at"], "unique_id": "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__ad_group_history_ad_group_id__modified_at.84af14c83b", "raw_code": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_d82553a0f3b4daa8d59460c85a542d4f\") }}", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "dbt_utils_unique_combination_o_d82553a0f3b4daa8d59460c85a542d4f.sql", "original_file_path": "models/stg_apple_search_ads.yml", "name": "dbt_utils_unique_combination_of_columns_stg_apple_search_ads__ad_group_history_ad_group_id__modified_at", "alias": "dbt_utils_unique_combination_o_d82553a0f3b4daa8d59460c85a542d4f", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_apple_search_ads__ad_group_history"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads.yml/dbt_utils_unique_combination_o_d82553a0f3b4daa8d59460c85a542d4f.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_d82553a0f3b4daa8d59460c85a542d4f"}, "created_at": 1666728758.091937, "compiled_code": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n ad_group_id, modified_at\n from `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__ad_group_history`\n group by ad_group_id, modified_at\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": null, "file_key_name": "models.stg_apple_search_ads__ad_group_history"}, "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_group_report_ad_group_id.a115f9cfc1": {"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}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__ad_group_report"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads_source", "not_null_stg_apple_search_ads__ad_group_report_ad_group_id"], "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_group_report_ad_group_id.a115f9cfc1", "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "not_null_stg_apple_search_ads__ad_group_report_ad_group_id.sql", "original_file_path": "models/stg_apple_search_ads.yml", "name": "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": ""}, "tags": [], "refs": [["stg_apple_search_ads__ad_group_report"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads.yml/not_null_stg_apple_search_ads__ad_group_report_ad_group_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1666728758.094362, "compiled_code": "\n \n \n\n\n\nselect ad_group_id\nfrom `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__ad_group_report`\nwhere ad_group_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "ad_group_id", "file_key_name": "models.stg_apple_search_ads__ad_group_report"}, "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_group_report_date_day.4dfd46a43b": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('stg_apple_search_ads__ad_group_report')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__ad_group_report"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads_source", "not_null_stg_apple_search_ads__ad_group_report_date_day"], "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_group_report_date_day.4dfd46a43b", "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "not_null_stg_apple_search_ads__ad_group_report_date_day.sql", "original_file_path": "models/stg_apple_search_ads.yml", "name": "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": ""}, "tags": [], "refs": [["stg_apple_search_ads__ad_group_report"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads.yml/not_null_stg_apple_search_ads__ad_group_report_date_day.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1666728758.095181, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__ad_group_report`\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "date_day", "file_key_name": "models.stg_apple_search_ads__ad_group_report"}, "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__ad_group_report_ad_group_id__date_day.a0fcc4e33c": {"test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["ad_group_id", "date_day"], "model": "{{ get_where_subquery(ref('stg_apple_search_ads__ad_group_report')) }}"}, "namespace": "dbt_utils"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_utils.test_unique_combination_of_columns", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__ad_group_report"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_107a9492c163887581fde6b34131e42d", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads_source", "dbt_utils_unique_combination_of_columns_stg_apple_search_ads__ad_group_report_ad_group_id__date_day"], "unique_id": "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__ad_group_report_ad_group_id__date_day.a0fcc4e33c", "raw_code": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_107a9492c163887581fde6b34131e42d\") }}", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "dbt_utils_unique_combination_o_107a9492c163887581fde6b34131e42d.sql", "original_file_path": "models/stg_apple_search_ads.yml", "name": "dbt_utils_unique_combination_of_columns_stg_apple_search_ads__ad_group_report_ad_group_id__date_day", "alias": "dbt_utils_unique_combination_o_107a9492c163887581fde6b34131e42d", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_apple_search_ads__ad_group_report"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads.yml/dbt_utils_unique_combination_o_107a9492c163887581fde6b34131e42d.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_107a9492c163887581fde6b34131e42d"}, "created_at": 1666728758.095996, "compiled_code": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n ad_group_id, date_day\n from `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__ad_group_report`\n group by ad_group_id, date_day\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": null, "file_key_name": "models.stg_apple_search_ads__ad_group_report"}, "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_history_modified_at.2eea7e006d": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "modified_at", "model": "{{ get_where_subquery(ref('stg_apple_search_ads__ad_history')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__ad_history"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads_source", "not_null_stg_apple_search_ads__ad_history_modified_at"], "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_history_modified_at.2eea7e006d", "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "not_null_stg_apple_search_ads__ad_history_modified_at.sql", "original_file_path": "models/stg_apple_search_ads.yml", "name": "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": ""}, "tags": [], "refs": [["stg_apple_search_ads__ad_history"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads.yml/not_null_stg_apple_search_ads__ad_history_modified_at.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1666728758.098546, "compiled_code": "\n \n \n\n\n\nselect modified_at\nfrom `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__ad_history`\nwhere modified_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "modified_at", "file_key_name": "models.stg_apple_search_ads__ad_history"}, "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_history_ad_id.4ad3bde32a": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "ad_id", "model": "{{ get_where_subquery(ref('stg_apple_search_ads__ad_history')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__ad_history"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads_source", "not_null_stg_apple_search_ads__ad_history_ad_id"], "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_history_ad_id.4ad3bde32a", "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "not_null_stg_apple_search_ads__ad_history_ad_id.sql", "original_file_path": "models/stg_apple_search_ads.yml", "name": "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": ""}, "tags": [], "refs": [["stg_apple_search_ads__ad_history"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads.yml/not_null_stg_apple_search_ads__ad_history_ad_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1666728758.099348, "compiled_code": "\n \n \n\n\n\nselect ad_id\nfrom `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__ad_history`\nwhere ad_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "ad_id", "file_key_name": "models.stg_apple_search_ads__ad_history"}, "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__ad_history_ad_id__modified_at.38599b8cba": {"test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["ad_id", "modified_at"], "model": "{{ get_where_subquery(ref('stg_apple_search_ads__ad_history')) }}"}, "namespace": "dbt_utils"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_utils.test_unique_combination_of_columns", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__ad_history"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_ed0f61b146739c836defcf2fb6005d31", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads_source", "dbt_utils_unique_combination_of_columns_stg_apple_search_ads__ad_history_ad_id__modified_at"], "unique_id": "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__ad_history_ad_id__modified_at.38599b8cba", "raw_code": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_ed0f61b146739c836defcf2fb6005d31\") }}", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "dbt_utils_unique_combination_o_ed0f61b146739c836defcf2fb6005d31.sql", "original_file_path": "models/stg_apple_search_ads.yml", "name": "dbt_utils_unique_combination_of_columns_stg_apple_search_ads__ad_history_ad_id__modified_at", "alias": "dbt_utils_unique_combination_o_ed0f61b146739c836defcf2fb6005d31", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_apple_search_ads__ad_history"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads.yml/dbt_utils_unique_combination_o_ed0f61b146739c836defcf2fb6005d31.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_ed0f61b146739c836defcf2fb6005d31"}, "created_at": 1666728758.100281, "compiled_code": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n ad_id, modified_at\n from `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__ad_history`\n group by ad_id, modified_at\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": null, "file_key_name": "models.stg_apple_search_ads__ad_history"}, "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_report_date_day.e6252346d8": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('stg_apple_search_ads__ad_report')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__ad_report"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads_source", "not_null_stg_apple_search_ads__ad_report_date_day"], "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_report_date_day.e6252346d8", "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "not_null_stg_apple_search_ads__ad_report_date_day.sql", "original_file_path": "models/stg_apple_search_ads.yml", "name": "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": ""}, "tags": [], "refs": [["stg_apple_search_ads__ad_report"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads.yml/not_null_stg_apple_search_ads__ad_report_date_day.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1666728758.102623, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__ad_report`\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "date_day", "file_key_name": "models.stg_apple_search_ads__ad_report"}, "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_report_ad_group_id.a397755e9f": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "ad_group_id", "model": "{{ get_where_subquery(ref('stg_apple_search_ads__ad_report')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__ad_report"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads_source", "not_null_stg_apple_search_ads__ad_report_ad_group_id"], "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_report_ad_group_id.a397755e9f", "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "not_null_stg_apple_search_ads__ad_report_ad_group_id.sql", "original_file_path": "models/stg_apple_search_ads.yml", "name": "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": ""}, "tags": [], "refs": [["stg_apple_search_ads__ad_report"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads.yml/not_null_stg_apple_search_ads__ad_report_ad_group_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1666728758.1034381, "compiled_code": "\n \n \n\n\n\nselect ad_group_id\nfrom `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__ad_report`\nwhere ad_group_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "ad_group_id", "file_key_name": "models.stg_apple_search_ads__ad_report"}, "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_report_ad_id.d08e760c58": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "ad_id", "model": "{{ get_where_subquery(ref('stg_apple_search_ads__ad_report')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__ad_report"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads_source", "not_null_stg_apple_search_ads__ad_report_ad_id"], "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_report_ad_id.d08e760c58", "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "not_null_stg_apple_search_ads__ad_report_ad_id.sql", "original_file_path": "models/stg_apple_search_ads.yml", "name": "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": ""}, "tags": [], "refs": [["stg_apple_search_ads__ad_report"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads.yml/not_null_stg_apple_search_ads__ad_report_ad_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1666728758.1042402, "compiled_code": "\n \n \n\n\n\nselect ad_id\nfrom `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__ad_report`\nwhere ad_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "ad_id", "file_key_name": "models.stg_apple_search_ads__ad_report"}, "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__ad_report_ad_id__date_day__ad_group_id.0d8d23c516": {"test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["ad_id", "date_day", "ad_group_id"], "model": "{{ get_where_subquery(ref('stg_apple_search_ads__ad_report')) }}"}, "namespace": "dbt_utils"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_utils.test_unique_combination_of_columns", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__ad_report"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_9ce5e828ce9fa0987b5e86cbcb1207b9", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads_source", "dbt_utils_unique_combination_of_columns_stg_apple_search_ads__ad_report_ad_id__date_day__ad_group_id"], "unique_id": "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__ad_report_ad_id__date_day__ad_group_id.0d8d23c516", "raw_code": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_9ce5e828ce9fa0987b5e86cbcb1207b9\") }}", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "dbt_utils_unique_combination_o_9ce5e828ce9fa0987b5e86cbcb1207b9.sql", "original_file_path": "models/stg_apple_search_ads.yml", "name": "dbt_utils_unique_combination_of_columns_stg_apple_search_ads__ad_report_ad_id__date_day__ad_group_id", "alias": "dbt_utils_unique_combination_o_9ce5e828ce9fa0987b5e86cbcb1207b9", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_apple_search_ads__ad_report"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads.yml/dbt_utils_unique_combination_o_9ce5e828ce9fa0987b5e86cbcb1207b9.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_9ce5e828ce9fa0987b5e86cbcb1207b9"}, "created_at": 1666728758.105052, "compiled_code": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n ad_id, date_day, ad_group_id\n from `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__ad_report`\n group by ad_id, date_day, ad_group_id\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": null, "file_key_name": "models.stg_apple_search_ads__ad_report"}, "test.apple_search_ads_source.not_null_stg_apple_search_ads__campaign_history_modified_at.f34a7a97c9": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "modified_at", "model": "{{ get_where_subquery(ref('stg_apple_search_ads__campaign_history')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__campaign_history"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads_source", "not_null_stg_apple_search_ads__campaign_history_modified_at"], "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__campaign_history_modified_at.f34a7a97c9", "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "not_null_stg_apple_search_ads__campaign_history_modified_at.sql", "original_file_path": "models/stg_apple_search_ads.yml", "name": "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": ""}, "tags": [], "refs": [["stg_apple_search_ads__campaign_history"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads.yml/not_null_stg_apple_search_ads__campaign_history_modified_at.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1666728758.107518, "compiled_code": "\n \n \n\n\n\nselect modified_at\nfrom `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__campaign_history`\nwhere modified_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "modified_at", "file_key_name": "models.stg_apple_search_ads__campaign_history"}, "test.apple_search_ads_source.not_null_stg_apple_search_ads__campaign_history_campaign_id.3f0f7502b8": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "campaign_id", "model": "{{ get_where_subquery(ref('stg_apple_search_ads__campaign_history')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__campaign_history"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads_source", "not_null_stg_apple_search_ads__campaign_history_campaign_id"], "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__campaign_history_campaign_id.3f0f7502b8", "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "not_null_stg_apple_search_ads__campaign_history_campaign_id.sql", "original_file_path": "models/stg_apple_search_ads.yml", "name": "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": ""}, "tags": [], "refs": [["stg_apple_search_ads__campaign_history"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads.yml/not_null_stg_apple_search_ads__campaign_history_campaign_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1666728758.108326, "compiled_code": "\n \n \n\n\n\nselect campaign_id\nfrom `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__campaign_history`\nwhere campaign_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "campaign_id", "file_key_name": "models.stg_apple_search_ads__campaign_history"}, "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__campaign_history_campaign_id__modified_at.317f970af9": {"test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["campaign_id", "modified_at"], "model": "{{ get_where_subquery(ref('stg_apple_search_ads__campaign_history')) }}"}, "namespace": "dbt_utils"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_utils.test_unique_combination_of_columns", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__campaign_history"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_055fa7e8a6c292e0f56d1feec61284a9", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads_source", "dbt_utils_unique_combination_of_columns_stg_apple_search_ads__campaign_history_campaign_id__modified_at"], "unique_id": "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__campaign_history_campaign_id__modified_at.317f970af9", "raw_code": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_055fa7e8a6c292e0f56d1feec61284a9\") }}", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "dbt_utils_unique_combination_o_055fa7e8a6c292e0f56d1feec61284a9.sql", "original_file_path": "models/stg_apple_search_ads.yml", "name": "dbt_utils_unique_combination_of_columns_stg_apple_search_ads__campaign_history_campaign_id__modified_at", "alias": "dbt_utils_unique_combination_o_055fa7e8a6c292e0f56d1feec61284a9", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_apple_search_ads__campaign_history"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads.yml/dbt_utils_unique_combination_o_055fa7e8a6c292e0f56d1feec61284a9.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_055fa7e8a6c292e0f56d1feec61284a9"}, "created_at": 1666728758.109264, "compiled_code": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n campaign_id, modified_at\n from `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__campaign_history`\n group by campaign_id, modified_at\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": null, "file_key_name": "models.stg_apple_search_ads__campaign_history"}, "test.apple_search_ads_source.not_null_stg_apple_search_ads__campaign_report_campaign_id.b83941e728": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "campaign_id", "model": "{{ get_where_subquery(ref('stg_apple_search_ads__campaign_report')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__campaign_report"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads_source", "not_null_stg_apple_search_ads__campaign_report_campaign_id"], "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__campaign_report_campaign_id.b83941e728", "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "not_null_stg_apple_search_ads__campaign_report_campaign_id.sql", "original_file_path": "models/stg_apple_search_ads.yml", "name": "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": ""}, "tags": [], "refs": [["stg_apple_search_ads__campaign_report"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads.yml/not_null_stg_apple_search_ads__campaign_report_campaign_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1666728758.1115808, "compiled_code": "\n \n \n\n\n\nselect campaign_id\nfrom `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__campaign_report`\nwhere campaign_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "campaign_id", "file_key_name": "models.stg_apple_search_ads__campaign_report"}, "test.apple_search_ads_source.not_null_stg_apple_search_ads__campaign_report_date_day.c8dc10a6f3": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('stg_apple_search_ads__campaign_report')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__campaign_report"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads_source", "not_null_stg_apple_search_ads__campaign_report_date_day"], "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__campaign_report_date_day.c8dc10a6f3", "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "not_null_stg_apple_search_ads__campaign_report_date_day.sql", "original_file_path": "models/stg_apple_search_ads.yml", "name": "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": ""}, "tags": [], "refs": [["stg_apple_search_ads__campaign_report"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads.yml/not_null_stg_apple_search_ads__campaign_report_date_day.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1666728758.112414, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__campaign_report`\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "date_day", "file_key_name": "models.stg_apple_search_ads__campaign_report"}, "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__campaign_report_campaign_id__date_day.bad41b0481": {"test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["campaign_id", "date_day"], "model": "{{ get_where_subquery(ref('stg_apple_search_ads__campaign_report')) }}"}, "namespace": "dbt_utils"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_utils.test_unique_combination_of_columns", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__campaign_report"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_d8bdb244aa45cb237ef5189371733c07", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads_source", "dbt_utils_unique_combination_of_columns_stg_apple_search_ads__campaign_report_campaign_id__date_day"], "unique_id": "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__campaign_report_campaign_id__date_day.bad41b0481", "raw_code": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_d8bdb244aa45cb237ef5189371733c07\") }}", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "dbt_utils_unique_combination_o_d8bdb244aa45cb237ef5189371733c07.sql", "original_file_path": "models/stg_apple_search_ads.yml", "name": "dbt_utils_unique_combination_of_columns_stg_apple_search_ads__campaign_report_campaign_id__date_day", "alias": "dbt_utils_unique_combination_o_d8bdb244aa45cb237ef5189371733c07", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_apple_search_ads__campaign_report"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads.yml/dbt_utils_unique_combination_o_d8bdb244aa45cb237ef5189371733c07.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_d8bdb244aa45cb237ef5189371733c07"}, "created_at": 1666728758.113218, "compiled_code": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n campaign_id, date_day\n from `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__campaign_report`\n group by campaign_id, date_day\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": null, "file_key_name": "models.stg_apple_search_ads__campaign_report"}, "test.apple_search_ads_source.not_null_stg_apple_search_ads__keyword_history_modified_at.42fde5a287": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "modified_at", "model": "{{ get_where_subquery(ref('stg_apple_search_ads__keyword_history')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__keyword_history"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads_source", "not_null_stg_apple_search_ads__keyword_history_modified_at"], "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__keyword_history_modified_at.42fde5a287", "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "not_null_stg_apple_search_ads__keyword_history_modified_at.sql", "original_file_path": "models/stg_apple_search_ads.yml", "name": "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": ""}, "tags": [], "refs": [["stg_apple_search_ads__keyword_history"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads.yml/not_null_stg_apple_search_ads__keyword_history_modified_at.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1666728758.115524, "compiled_code": "\n \n \n\n\n\nselect modified_at\nfrom `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__keyword_history`\nwhere modified_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "modified_at", "file_key_name": "models.stg_apple_search_ads__keyword_history"}, "test.apple_search_ads_source.not_null_stg_apple_search_ads__keyword_history_keyword_id.889f83cfd2": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "keyword_id", "model": "{{ get_where_subquery(ref('stg_apple_search_ads__keyword_history')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__keyword_history"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads_source", "not_null_stg_apple_search_ads__keyword_history_keyword_id"], "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__keyword_history_keyword_id.889f83cfd2", "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "not_null_stg_apple_search_ads__keyword_history_keyword_id.sql", "original_file_path": "models/stg_apple_search_ads.yml", "name": "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": ""}, "tags": [], "refs": [["stg_apple_search_ads__keyword_history"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads.yml/not_null_stg_apple_search_ads__keyword_history_keyword_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1666728758.116332, "compiled_code": "\n \n \n\n\n\nselect keyword_id\nfrom `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__keyword_history`\nwhere keyword_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "keyword_id", "file_key_name": "models.stg_apple_search_ads__keyword_history"}, "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__keyword_history_keyword_id__modified_at.7b06162d24": {"test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["keyword_id", "modified_at"], "model": "{{ get_where_subquery(ref('stg_apple_search_ads__keyword_history')) }}"}, "namespace": "dbt_utils"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_utils.test_unique_combination_of_columns", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__keyword_history"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_26b09b2f81a50b0ba84b566cd7df85b5", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads_source", "dbt_utils_unique_combination_of_columns_stg_apple_search_ads__keyword_history_keyword_id__modified_at"], "unique_id": "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__keyword_history_keyword_id__modified_at.7b06162d24", "raw_code": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_26b09b2f81a50b0ba84b566cd7df85b5\") }}", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "dbt_utils_unique_combination_o_26b09b2f81a50b0ba84b566cd7df85b5.sql", "original_file_path": "models/stg_apple_search_ads.yml", "name": "dbt_utils_unique_combination_of_columns_stg_apple_search_ads__keyword_history_keyword_id__modified_at", "alias": "dbt_utils_unique_combination_o_26b09b2f81a50b0ba84b566cd7df85b5", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_apple_search_ads__keyword_history"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads.yml/dbt_utils_unique_combination_o_26b09b2f81a50b0ba84b566cd7df85b5.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_26b09b2f81a50b0ba84b566cd7df85b5"}, "created_at": 1666728758.117153, "compiled_code": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n keyword_id, modified_at\n from `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__keyword_history`\n group by keyword_id, modified_at\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": null, "file_key_name": "models.stg_apple_search_ads__keyword_history"}, "test.apple_search_ads_source.not_null_stg_apple_search_ads__keyword_report_keyword_id.501725b09e": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "keyword_id", "model": "{{ get_where_subquery(ref('stg_apple_search_ads__keyword_report')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__keyword_report"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads_source", "not_null_stg_apple_search_ads__keyword_report_keyword_id"], "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__keyword_report_keyword_id.501725b09e", "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "not_null_stg_apple_search_ads__keyword_report_keyword_id.sql", "original_file_path": "models/stg_apple_search_ads.yml", "name": "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": ""}, "tags": [], "refs": [["stg_apple_search_ads__keyword_report"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads.yml/not_null_stg_apple_search_ads__keyword_report_keyword_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1666728758.1194549, "compiled_code": "\n \n \n\n\n\nselect keyword_id\nfrom `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__keyword_report`\nwhere keyword_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "keyword_id", "file_key_name": "models.stg_apple_search_ads__keyword_report"}, "test.apple_search_ads_source.not_null_stg_apple_search_ads__keyword_report_date_day.16098db928": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('stg_apple_search_ads__keyword_report')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__keyword_report"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads_source", "not_null_stg_apple_search_ads__keyword_report_date_day"], "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__keyword_report_date_day.16098db928", "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "not_null_stg_apple_search_ads__keyword_report_date_day.sql", "original_file_path": "models/stg_apple_search_ads.yml", "name": "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": ""}, "tags": [], "refs": [["stg_apple_search_ads__keyword_report"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads.yml/not_null_stg_apple_search_ads__keyword_report_date_day.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1666728758.120259, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__keyword_report`\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "date_day", "file_key_name": "models.stg_apple_search_ads__keyword_report"}, "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__keyword_report_keyword_id__date_day.9f0099cff8": {"test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["keyword_id", "date_day"], "model": "{{ get_where_subquery(ref('stg_apple_search_ads__keyword_report')) }}"}, "namespace": "dbt_utils"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_utils.test_unique_combination_of_columns", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__keyword_report"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_2ec7f68205f05a3b68cfa7324135a1a5", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads_source", "dbt_utils_unique_combination_of_columns_stg_apple_search_ads__keyword_report_keyword_id__date_day"], "unique_id": "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__keyword_report_keyword_id__date_day.9f0099cff8", "raw_code": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_2ec7f68205f05a3b68cfa7324135a1a5\") }}", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "dbt_utils_unique_combination_o_2ec7f68205f05a3b68cfa7324135a1a5.sql", "original_file_path": "models/stg_apple_search_ads.yml", "name": "dbt_utils_unique_combination_of_columns_stg_apple_search_ads__keyword_report_keyword_id__date_day", "alias": "dbt_utils_unique_combination_o_2ec7f68205f05a3b68cfa7324135a1a5", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_apple_search_ads__keyword_report"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads.yml/dbt_utils_unique_combination_o_2ec7f68205f05a3b68cfa7324135a1a5.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_2ec7f68205f05a3b68cfa7324135a1a5"}, "created_at": 1666728758.1211898, "compiled_code": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n keyword_id, date_day\n from `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__keyword_report`\n group by keyword_id, date_day\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": null, "file_key_name": "models.stg_apple_search_ads__keyword_report"}, "test.apple_search_ads_source.not_null_stg_apple_search_ads__organization_organization_id.b013ce33cb": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "organization_id", "model": "{{ get_where_subquery(ref('stg_apple_search_ads__organization')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__organization"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads_source", "not_null_stg_apple_search_ads__organization_organization_id"], "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__organization_organization_id.b013ce33cb", "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "not_null_stg_apple_search_ads__organization_organization_id.sql", "original_file_path": "models/stg_apple_search_ads.yml", "name": "not_null_stg_apple_search_ads__organization_organization_id", "alias": "not_null_stg_apple_search_ads__organization_organization_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_apple_search_ads__organization"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads.yml/not_null_stg_apple_search_ads__organization_organization_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1666728758.123502, "compiled_code": "\n \n \n\n\n\nselect organization_id\nfrom `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__organization`\nwhere organization_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "organization_id", "file_key_name": "models.stg_apple_search_ads__organization"}, "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__organization_organization_id.8647048f7a": {"test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["organization_id"], "model": "{{ get_where_subquery(ref('stg_apple_search_ads__organization')) }}"}, "namespace": "dbt_utils"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_utils.test_unique_combination_of_columns", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__organization"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_53ded9060f9d3981217ae23e5d2ba89b", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads_source", "dbt_utils_unique_combination_of_columns_stg_apple_search_ads__organization_organization_id"], "unique_id": "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__organization_organization_id.8647048f7a", "raw_code": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_53ded9060f9d3981217ae23e5d2ba89b\") }}", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "dbt_utils_unique_combination_o_53ded9060f9d3981217ae23e5d2ba89b.sql", "original_file_path": "models/stg_apple_search_ads.yml", "name": "dbt_utils_unique_combination_of_columns_stg_apple_search_ads__organization_organization_id", "alias": "dbt_utils_unique_combination_o_53ded9060f9d3981217ae23e5d2ba89b", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_apple_search_ads__organization"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads.yml/dbt_utils_unique_combination_o_53ded9060f9d3981217ae23e5d2ba89b.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_53ded9060f9d3981217ae23e5d2ba89b"}, "created_at": 1666728758.124318, "compiled_code": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n organization_id\n from `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__organization`\n group by organization_id\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": null, "file_key_name": "models.stg_apple_search_ads__organization"}, "test.apple_search_ads_source.not_null_stg_apple_search_ads__search_term_report__fivetran_id.aa430d1dad": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "_fivetran_id", "model": "{{ get_where_subquery(ref('stg_apple_search_ads__search_term_report')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__search_term_report"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads_source", "not_null_stg_apple_search_ads__search_term_report__fivetran_id"], "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__search_term_report__fivetran_id.aa430d1dad", "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "not_null_stg_apple_search_ads__search_term_report__fivetran_id.sql", "original_file_path": "models/stg_apple_search_ads.yml", "name": "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": ""}, "tags": [], "refs": [["stg_apple_search_ads__search_term_report"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads.yml/not_null_stg_apple_search_ads__search_term_report__fivetran_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1666728758.126466, "compiled_code": "\n \n \n\n\n\nselect _fivetran_id\nfrom `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__search_term_report`\nwhere _fivetran_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "_fivetran_id", "file_key_name": "models.stg_apple_search_ads__search_term_report"}, "test.apple_search_ads_source.not_null_stg_apple_search_ads__search_term_report_date_day.fd93df3302": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('stg_apple_search_ads__search_term_report')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__search_term_report"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads_source", "not_null_stg_apple_search_ads__search_term_report_date_day"], "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__search_term_report_date_day.fd93df3302", "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "not_null_stg_apple_search_ads__search_term_report_date_day.sql", "original_file_path": "models/stg_apple_search_ads.yml", "name": "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": ""}, "tags": [], "refs": [["stg_apple_search_ads__search_term_report"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads.yml/not_null_stg_apple_search_ads__search_term_report_date_day.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1666728758.12727, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__search_term_report`\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "date_day", "file_key_name": "models.stg_apple_search_ads__search_term_report"}, "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__search_term_report__fivetran_id__date_day.aad2a48344": {"test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["_fivetran_id", "date_day"], "model": "{{ get_where_subquery(ref('stg_apple_search_ads__search_term_report')) }}"}, "namespace": "dbt_utils"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_utils.test_unique_combination_of_columns", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__search_term_report"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_4b957c6b8a75dcd1a6055884f71d71c1", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads_source", "dbt_utils_unique_combination_of_columns_stg_apple_search_ads__search_term_report__fivetran_id__date_day"], "unique_id": "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__search_term_report__fivetran_id__date_day.aad2a48344", "raw_code": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_4b957c6b8a75dcd1a6055884f71d71c1\") }}", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "dbt_utils_unique_combination_o_4b957c6b8a75dcd1a6055884f71d71c1.sql", "original_file_path": "models/stg_apple_search_ads.yml", "name": "dbt_utils_unique_combination_of_columns_stg_apple_search_ads__search_term_report__fivetran_id__date_day", "alias": "dbt_utils_unique_combination_o_4b957c6b8a75dcd1a6055884f71d71c1", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_apple_search_ads__search_term_report"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads.yml/dbt_utils_unique_combination_o_4b957c6b8a75dcd1a6055884f71d71c1.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_4b957c6b8a75dcd1a6055884f71d71c1"}, "created_at": 1666728758.1280682, "compiled_code": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n _fivetran_id, date_day\n from `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__search_term_report`\n group by _fivetran_id, date_day\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": null, "file_key_name": "models.stg_apple_search_ads__search_term_report"}}, "sources": {"source.apple_search_ads_source.apple_search_ads.ad_group_history": {"fqn": ["apple_search_ads_source", "apple_search_ads", "ad_group_history"], "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests", "unique_id": "source.apple_search_ads_source.apple_search_ads.ad_group_history", "package_name": "apple_search_ads_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "models/src_apple_search_ads.yml", "original_file_path": "models/src_apple_search_ads.yml", "name": "ad_group_history", "source_name": "apple_search_ads", "source_description": "", "loader": "Fivetran", "identifier": "ad_group_history_data", "resource_type": "source", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "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, "quote": null, "tags": []}, "id": {"name": "id", "description": "Ad group ID associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_id": {"name": "campaign_id", "description": "Campaign ID associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "start_time": {"name": "start_time", "description": "Timestamp of designated ad group start time.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "end_time": {"name": "end_time", "description": "The designated ad group end time.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "name": {"name": "name", "description": "Ad group name.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "organization_id": {"name": "organization_id", "description": "Organization ID associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "status": {"name": "status", "description": "The current status of the ad group, values include ENABLED and PAUSED.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {"enabled": true}, "relation_name": "`dbt-package-testing`.`apple_search_ads_integration_tests`.`ad_group_history_data`", "created_at": 1666728758.130291}, "source.apple_search_ads_source.apple_search_ads.ad_group_report": {"fqn": ["apple_search_ads_source", "apple_search_ads", "ad_group_report"], "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests", "unique_id": "source.apple_search_ads_source.apple_search_ads.ad_group_report", "package_name": "apple_search_ads_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "models/src_apple_search_ads.yml", "original_file_path": "models/src_apple_search_ads.yml", "name": "ad_group_report", "source_name": "apple_search_ads", "source_description": "", "loader": "Fivetran", "identifier": "ad_group_report_data", "resource_type": "source", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "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, "quote": null, "tags": []}, "date": {"name": "date", "description": "Date for daily report aggregation.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "impressions": {"name": "impressions", "description": "Number of times your ad appeared in App Store search results.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "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, "quote": null, "tags": []}, "local_spend_currency": {"name": "local_spend_currency", "description": "This currency value should match the respective organization's currency value.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "new_downloads": {"name": "new_downloads", "description": "App downloads from new users who have never before installed the respective app.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "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.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "taps": {"name": "taps", "description": "The number of times ad was tapped by users within the reporting time period.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {"enabled": true}, "relation_name": "`dbt-package-testing`.`apple_search_ads_integration_tests`.`ad_group_report_data`", "created_at": 1666728758.130379}, "source.apple_search_ads_source.apple_search_ads.ad_history": {"fqn": ["apple_search_ads_source", "apple_search_ads", "ad_history"], "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests", "unique_id": "source.apple_search_ads_source.apple_search_ads.ad_history", "package_name": "apple_search_ads_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "models/src_apple_search_ads.yml", "original_file_path": "models/src_apple_search_ads.yml", "name": "ad_history", "source_name": "apple_search_ads", "source_description": "", "loader": "Fivetran", "identifier": "ad_history_data", "resource_type": "source", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "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, "quote": null, "tags": []}, "modification_time": {"name": "modification_time", "description": "Timestamp of when the ad object was last modified.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "org_id": {"name": "org_id", "description": "Organization ID associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_id": {"name": "campaign_id", "description": "Campaign ID associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "ad_group_id": {"name": "ad_group_id", "description": "Ad group ID associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "name": {"name": "name", "description": "Ad name associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "id": {"name": "id", "description": "Ad ID associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "status": {"name": "status", "description": "The current status of the ad, values include ENABLED and PAUSED.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {"enabled": true}, "relation_name": "`dbt-package-testing`.`apple_search_ads_integration_tests`.`ad_history_data`", "created_at": 1666728758.130451}, "source.apple_search_ads_source.apple_search_ads.ad_level_report": {"fqn": ["apple_search_ads_source", "apple_search_ads", "ad_level_report"], "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests", "unique_id": "source.apple_search_ads_source.apple_search_ads.ad_level_report", "package_name": "apple_search_ads_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "models/src_apple_search_ads.yml", "original_file_path": "models/src_apple_search_ads.yml", "name": "ad_level_report", "source_name": "apple_search_ads", "source_description": "", "loader": "Fivetran", "identifier": "ad_report_data", "resource_type": "source", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "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, "quote": null, "tags": []}, "campaign_id": {"name": "campaign_id", "description": "Campaign ID associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "ad_group_id": {"name": "ad_group_id", "description": "Ad group ID associated with the record", "meta": {}, "data_type": null, "quote": null, "tags": []}, "ad_id": {"name": "ad_id", "description": "Ad ID associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "impressions": {"name": "impressions", "description": "Number of times your ad appeared in App Store search results.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "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, "quote": null, "tags": []}, "local_spend_currency": {"name": "local_spend_currency", "description": "This currency value should match the respective organization's currency value.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "new_downloads": {"name": "new_downloads", "description": "App downloads from new users who have never before installed the respective app.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "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.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "taps": {"name": "taps", "description": "The number of times ad was tapped by users within the reporting time period.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {"enabled": true}, "relation_name": "`dbt-package-testing`.`apple_search_ads_integration_tests`.`ad_report_data`", "created_at": 1666728758.130522}, "source.apple_search_ads_source.apple_search_ads.campaign_history": {"fqn": ["apple_search_ads_source", "apple_search_ads", "campaign_history"], "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests", "unique_id": "source.apple_search_ads_source.apple_search_ads.campaign_history", "package_name": "apple_search_ads_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "models/src_apple_search_ads.yml", "original_file_path": "models/src_apple_search_ads.yml", "name": "campaign_history", "source_name": "apple_search_ads", "source_description": "", "loader": "Fivetran", "identifier": "campaign_history_data", "resource_type": "source", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "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, "quote": null, "tags": []}, "id": {"name": "id", "description": "Campaign ID associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "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, "quote": null, "tags": []}, "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, "quote": null, "tags": []}, "name": {"name": "name", "description": "Campaign name for the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "organization_id": {"name": "organization_id", "description": "Organization ID associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "status": {"name": "status", "description": "The current status of the campaign, values include ENABLED and PAUSED.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {"enabled": true}, "relation_name": "`dbt-package-testing`.`apple_search_ads_integration_tests`.`campaign_history_data`", "created_at": 1666728758.1305878}, "source.apple_search_ads_source.apple_search_ads.campaign_report": {"fqn": ["apple_search_ads_source", "apple_search_ads", "campaign_report"], "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests", "unique_id": "source.apple_search_ads_source.apple_search_ads.campaign_report", "package_name": "apple_search_ads_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "models/src_apple_search_ads.yml", "original_file_path": "models/src_apple_search_ads.yml", "name": "campaign_report", "source_name": "apple_search_ads", "source_description": "", "loader": "Fivetran", "identifier": "campaign_report_data", "resource_type": "source", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "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, "quote": null, "tags": []}, "date": {"name": "date", "description": "Date for daily report aggregation.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "impressions": {"name": "impressions", "description": "Number of times your ad appeared in App Store search results.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "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, "quote": null, "tags": []}, "local_spend_currency": {"name": "local_spend_currency", "description": "This currency value should match the respective organization's currency value.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "new_downloads": {"name": "new_downloads", "description": "App downloads from new users who have never before installed the respective app.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "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.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "taps": {"name": "taps", "description": "The number of times ad was tapped by users within the reporting time period.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {"enabled": true}, "relation_name": "`dbt-package-testing`.`apple_search_ads_integration_tests`.`campaign_report_data`", "created_at": 1666728758.1306539}, "source.apple_search_ads_source.apple_search_ads.keyword_history": {"fqn": ["apple_search_ads_source", "apple_search_ads", "keyword_history"], "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests", "unique_id": "source.apple_search_ads_source.apple_search_ads.keyword_history", "package_name": "apple_search_ads_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "models/src_apple_search_ads.yml", "original_file_path": "models/src_apple_search_ads.yml", "name": "keyword_history", "source_name": "apple_search_ads", "source_description": "", "loader": "Fivetran", "identifier": "keyword_history_data", "resource_type": "source", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "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, "quote": null, "tags": []}, "id": {"name": "id", "description": "Keyword ID associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_id": {"name": "campaign_id", "description": "Campaign ID associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "ad_group_id": {"name": "ad_group_id", "description": "Ad group ID associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "bid_amount": {"name": "bid_amount", "description": "The bid amount to display your ad for the matching text value.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "bid_currency": {"name": "bid_currency", "description": "This currency value should match the respective organization's currency value.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "match_type": {"name": "match_type", "description": "Controls how ads are matched to user searches; EXACT or BROAD.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "status": {"name": "status", "description": "The current status of the keyword, values include ENABLED and PAUSED.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "text": {"name": "text", "description": "The word or phrase to match in user searches, to show respective ad.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {"enabled": true}, "relation_name": "`dbt-package-testing`.`apple_search_ads_integration_tests`.`keyword_history_data`", "created_at": 1666728758.130722}, "source.apple_search_ads_source.apple_search_ads.keyword_report": {"fqn": ["apple_search_ads_source", "apple_search_ads", "keyword_report"], "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests", "unique_id": "source.apple_search_ads_source.apple_search_ads.keyword_report", "package_name": "apple_search_ads_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "models/src_apple_search_ads.yml", "original_file_path": "models/src_apple_search_ads.yml", "name": "keyword_report", "source_name": "apple_search_ads", "source_description": "", "loader": "Fivetran", "identifier": "keyword_report_data", "resource_type": "source", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "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, "quote": null, "tags": []}, "date": {"name": "date", "description": "Date for daily report aggregation.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "impressions": {"name": "impressions", "description": "Number of times your ad appeared in App Store search results.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "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, "quote": null, "tags": []}, "local_spend_currency": {"name": "local_spend_currency", "description": "This currency value should match the respective organization's currency value.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "new_downloads": {"name": "new_downloads", "description": "App downloads from new users who have never before installed the respective app.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "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.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "taps": {"name": "taps", "description": "The number of times ad was tapped by users within the reporting time period.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {"enabled": true}, "relation_name": "`dbt-package-testing`.`apple_search_ads_integration_tests`.`keyword_report_data`", "created_at": 1666728758.130789}, "source.apple_search_ads_source.apple_search_ads.organization": {"fqn": ["apple_search_ads_source", "apple_search_ads", "organization"], "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests", "unique_id": "source.apple_search_ads_source.apple_search_ads.organization", "package_name": "apple_search_ads_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "models/src_apple_search_ads.yml", "original_file_path": "models/src_apple_search_ads.yml", "name": "organization", "source_name": "apple_search_ads", "source_description": "", "loader": "Fivetran", "identifier": "organization_data", "resource_type": "source", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "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, "quote": null, "tags": []}, "currency": {"name": "currency", "description": "Specified currency for respective organization.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "payment_model": {"name": "payment_model", "description": "Values include 'LOC', 'PAYG' or (payment method hasn't been set).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "organization_name": {"name": "organization_name", "description": "Name of organization.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "time_zone": {"name": "time_zone", "description": "Organization default timezone; values can be ORTZ or UTC.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {"enabled": true}, "relation_name": "`dbt-package-testing`.`apple_search_ads_integration_tests`.`organization_data`", "created_at": 1666728758.130854}, "source.apple_search_ads_source.apple_search_ads.search_term_report": {"fqn": ["apple_search_ads_source", "apple_search_ads", "search_term_report"], "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests", "unique_id": "source.apple_search_ads_source.apple_search_ads.search_term_report", "package_name": "apple_search_ads_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "models/src_apple_search_ads.yml", "original_file_path": "models/src_apple_search_ads.yml", "name": "search_term_report", "source_name": "apple_search_ads", "source_description": "", "loader": "Fivetran", "identifier": "search_term_report_data", "resource_type": "source", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "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, "quote": null, "tags": []}, "ad_group_id": {"name": "ad_group_id", "description": "Ad group ID associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_id": {"name": "campaign_id", "description": "Campaign ID associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "date": {"name": "date", "description": "Date for daily report aggregation.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "ad_group_name": {"name": "ad_group_name", "description": "Ad group name.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "bid_amount_amount": {"name": "bid_amount_amount", "description": "The bid amount to display your ad for the matching text value.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "bid_amount_currency": {"name": "bid_amount_currency", "description": "This currency value should match the respective organization's currency value.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "keyword": {"name": "keyword", "description": "The word or phrase to match in user searches, to show respective ad.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "keyword_display_status": {"name": "keyword_display_status", "description": "The keyword display status can either be ACTIVE or PAUSED.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "keyword_id": {"name": "keyword_id", "description": "Keyword ID associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "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, "quote": null, "tags": []}, "local_spend_currency": {"name": "local_spend_currency", "description": "This currency value should match the respective organization's currency value.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "match_type": {"name": "match_type", "description": "Controls how ads are matched to user searches; values include EXACT, BROAD or AUTO.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "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, "quote": null, "tags": []}, "search_term_text": {"name": "search_term_text", "description": "The word or phrase to match of user searches.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "impressions": {"name": "impressions", "description": "Number of times your ad appeared in App Store search results.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "taps": {"name": "taps", "description": "The number of times ad was tapped by users within the reporting time period.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "new_downloads": {"name": "new_downloads", "description": "App downloads from new users who have never before installed the respective app.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "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.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": "True and True"}, "patch_path": null, "unrendered_config": {"enabled": "True and True"}, "relation_name": "`dbt-package-testing`.`apple_search_ads_integration_tests`.`search_term_report_data`", "created_at": 1666728758.130933}}, "macros": {"macro.dbt_bigquery.date_sharded_table": {"unique_id": "macro.dbt_bigquery.date_sharded_table", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/bigquery", "path": "macros/etc.sql", "original_file_path": "macros/etc.sql", "name": "date_sharded_table", "macro_sql": "{% macro date_sharded_table(base_name) %}\n {{ return(base_name ~ \"[DBT__PARTITION_DATE]\") }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.272863, "supported_languages": null}, "macro.dbt_bigquery.grant_access_to": {"unique_id": "macro.dbt_bigquery.grant_access_to", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/bigquery", "path": "macros/etc.sql", "original_file_path": "macros/etc.sql", "name": "grant_access_to", "macro_sql": "{% macro grant_access_to(entity, entity_type, role, grant_target_dict) -%}\n {% do adapter.grant_access_to(entity, entity_type, role, grant_target_dict) %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.273071, "supported_languages": null}, "macro.dbt_bigquery.get_partitions_metadata": {"unique_id": "macro.dbt_bigquery.get_partitions_metadata", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/bigquery", "path": "macros/etc.sql", "original_file_path": "macros/etc.sql", "name": "get_partitions_metadata", "macro_sql": "\n\n{%- macro get_partitions_metadata(table) -%}\n {%- if execute -%}\n {%- set res = adapter.get_partitions_metadata(table) -%}\n {{- return(res) -}}\n {%- endif -%}\n {{- return(None) -}}\n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.2733219, "supported_languages": null}, "macro.dbt_bigquery.bigquery__get_catalog": {"unique_id": "macro.dbt_bigquery.bigquery__get_catalog", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/bigquery", "path": "macros/catalog.sql", "original_file_path": "macros/catalog.sql", "name": "bigquery__get_catalog", "macro_sql": "{% macro bigquery__get_catalog(information_schema, schemas) -%}\n\n {%- if (schemas | length) == 0 -%}\n {# Hopefully nothing cares about the columns we return when there are no rows #}\n {%- set query = \"select 1 as id limit 0\" -%}\n {%- else -%}\n\n {%- set query -%}\n with tables as (\n select\n project_id as table_database,\n dataset_id as table_schema,\n table_id as original_table_name,\n\n concat(project_id, '.', dataset_id, '.', table_id) as relation_id,\n\n row_count,\n size_bytes as size_bytes,\n case\n when type = 1 then 'table'\n when type = 2 then 'view'\n else 'external'\n end as table_type,\n\n REGEXP_CONTAINS(table_id, '^.+[0-9]{8}$') and coalesce(type, 0) = 1 as is_date_shard,\n REGEXP_EXTRACT(table_id, '^(.+)[0-9]{8}$') as shard_base_name,\n REGEXP_EXTRACT(table_id, '^.+([0-9]{8})$') as shard_name\n\n from {{ information_schema.replace(information_schema_view='__TABLES__') }}\n where (\n {%- for schema in schemas -%}\n upper(dataset_id) = upper('{{ schema }}'){%- if not loop.last %} or {% endif -%}\n {%- endfor -%}\n )\n ),\n\n extracted as (\n\n select *,\n case\n when is_date_shard then shard_base_name\n else original_table_name\n end as table_name\n\n from tables\n\n ),\n\n unsharded_tables as (\n\n select\n table_database,\n table_schema,\n table_name,\n coalesce(table_type, 'external') as table_type,\n is_date_shard,\n\n struct(\n min(shard_name) as shard_min,\n max(shard_name) as shard_max,\n count(*) as shard_count\n ) as table_shards,\n\n sum(size_bytes) as size_bytes,\n sum(row_count) as row_count,\n\n max(relation_id) as relation_id\n\n from extracted\n group by 1,2,3,4,5\n\n ),\n\n info_schema_columns as (\n\n select\n concat(table_catalog, '.', table_schema, '.', table_name) as relation_id,\n table_catalog as table_database,\n table_schema,\n table_name,\n\n -- use the \"real\" column name from the paths query below\n column_name as base_column_name,\n ordinal_position as column_index,\n\n is_partitioning_column,\n clustering_ordinal_position\n\n from {{ information_schema.replace(information_schema_view='COLUMNS') }}\n where ordinal_position is not null\n\n ),\n\n info_schema_column_paths as (\n\n select\n concat(table_catalog, '.', table_schema, '.', table_name) as relation_id,\n field_path as column_name,\n data_type as column_type,\n column_name as base_column_name,\n description as column_comment\n\n from {{ information_schema.replace(information_schema_view='COLUMN_FIELD_PATHS') }}\n\n ),\n\n columns as (\n\n select * except (base_column_name)\n from info_schema_columns\n join info_schema_column_paths using (relation_id, base_column_name)\n\n ),\n\n column_stats as (\n\n select\n table_database,\n table_schema,\n table_name,\n max(relation_id) as relation_id,\n max(case when is_partitioning_column = 'YES' then 1 else 0 end) = 1 as is_partitioned,\n max(case when is_partitioning_column = 'YES' then column_name else null end) as partition_column,\n max(case when clustering_ordinal_position is not null then 1 else 0 end) = 1 as is_clustered,\n array_to_string(\n array_agg(\n case\n when clustering_ordinal_position is not null then column_name\n else null\n end ignore nulls\n order by clustering_ordinal_position\n ), ', '\n ) as clustering_columns\n\n from columns\n group by 1,2,3\n\n )\n\n select\n unsharded_tables.table_database,\n unsharded_tables.table_schema,\n case\n when is_date_shard then concat(unsharded_tables.table_name, '*')\n else unsharded_tables.table_name\n end as table_name,\n unsharded_tables.table_type,\n\n -- coalesce name and type for External tables - these columns are not\n -- present in the COLUMN_FIELD_PATHS resultset\n coalesce(columns.column_name, '') as column_name,\n -- invent a row number to account for nested fields -- BQ does\n -- not treat these nested properties as independent fields\n row_number() over (\n partition by relation_id\n order by columns.column_index, columns.column_name\n ) as column_index,\n coalesce(columns.column_type, '') as column_type,\n columns.column_comment,\n\n 'Shard count' as `stats__date_shards__label`,\n table_shards.shard_count as `stats__date_shards__value`,\n 'The number of date shards in this table' as `stats__date_shards__description`,\n is_date_shard as `stats__date_shards__include`,\n\n 'Shard (min)' as `stats__date_shard_min__label`,\n table_shards.shard_min as `stats__date_shard_min__value`,\n 'The first date shard in this table' as `stats__date_shard_min__description`,\n is_date_shard as `stats__date_shard_min__include`,\n\n 'Shard (max)' as `stats__date_shard_max__label`,\n table_shards.shard_max as `stats__date_shard_max__value`,\n 'The last date shard in this table' as `stats__date_shard_max__description`,\n is_date_shard as `stats__date_shard_max__include`,\n\n '# Rows' as `stats__num_rows__label`,\n row_count as `stats__num_rows__value`,\n 'Approximate count of rows in this table' as `stats__num_rows__description`,\n (unsharded_tables.table_type = 'table') as `stats__num_rows__include`,\n\n 'Approximate Size' as `stats__num_bytes__label`,\n size_bytes as `stats__num_bytes__value`,\n 'Approximate size of table as reported by BigQuery' as `stats__num_bytes__description`,\n (unsharded_tables.table_type = 'table') as `stats__num_bytes__include`,\n\n 'Partitioned By' as `stats__partitioning_type__label`,\n partition_column as `stats__partitioning_type__value`,\n 'The partitioning column for this table' as `stats__partitioning_type__description`,\n is_partitioned as `stats__partitioning_type__include`,\n\n 'Clustered By' as `stats__clustering_fields__label`,\n clustering_columns as `stats__clustering_fields__value`,\n 'The clustering columns for this table' as `stats__clustering_fields__description`,\n is_clustered as `stats__clustering_fields__include`\n\n -- join using relation_id (an actual relation, not a shard prefix) to make\n -- sure that column metadata is picked up through the join. This will only\n -- return the column information for the \"max\" table in a date-sharded table set\n from unsharded_tables\n left join columns using (relation_id)\n left join column_stats using (relation_id)\n {%- endset -%}\n\n {%- endif -%}\n\n {{ return(run_query(query)) }}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.replace", "macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.27642, "supported_languages": null}, "macro.dbt_bigquery.partition_by": {"unique_id": "macro.dbt_bigquery.partition_by", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/bigquery", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "partition_by", "macro_sql": "{% macro partition_by(partition_config) -%}\n {%- if partition_config is none -%}\n {% do return('') %}\n {%- elif partition_config.data_type | lower in ('date','timestamp','datetime') -%}\n partition by {{ partition_config.render() }}\n {%- elif partition_config.data_type | lower in ('int64') -%}\n {%- set range = partition_config.range -%}\n partition by range_bucket(\n {{ partition_config.field }},\n generate_array({{ range.start}}, {{ range.end }}, {{ range.interval }})\n )\n {%- endif -%}\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.280206, "supported_languages": null}, "macro.dbt_bigquery.cluster_by": {"unique_id": "macro.dbt_bigquery.cluster_by", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/bigquery", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "cluster_by", "macro_sql": "{% macro cluster_by(raw_cluster_by) %}\n {%- if raw_cluster_by is not none -%}\n cluster by {% if raw_cluster_by is string -%}\n {% set raw_cluster_by = [raw_cluster_by] %}\n {%- endif -%}\n {%- for cluster in raw_cluster_by -%}\n {{ cluster }}\n {%- if not loop.last -%}, {% endif -%}\n {%- endfor -%}\n\n {% endif %}\n\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.280551, "supported_languages": null}, "macro.dbt_bigquery.bigquery_options": {"unique_id": "macro.dbt_bigquery.bigquery_options", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/bigquery", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "bigquery_options", "macro_sql": "{% macro bigquery_options(opts) %}\n {% set options -%}\n OPTIONS({% for opt_key, opt_val in opts.items() %}\n {{ opt_key }}={{ opt_val }}{{ \",\" if not loop.last }}\n {% endfor %})\n {%- endset %}\n {%- do return(options) -%}\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.280867, "supported_languages": null}, "macro.dbt_bigquery.bigquery_table_options": {"unique_id": "macro.dbt_bigquery.bigquery_table_options", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/bigquery", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "bigquery_table_options", "macro_sql": "{% macro bigquery_table_options(config, node, temporary) %}\n {% set opts = adapter.get_table_options(config, node, temporary) %}\n {%- do return(bigquery_options(opts)) -%}\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_bigquery.bigquery_options"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.2811031, "supported_languages": null}, "macro.dbt_bigquery.bigquery__create_table_as": {"unique_id": "macro.dbt_bigquery.bigquery__create_table_as", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/bigquery", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "bigquery__create_table_as", "macro_sql": "{% macro bigquery__create_table_as(temporary, relation, compiled_code, language='sql') -%}\n {%- if language == 'sql' -%}\n {%- set raw_partition_by = config.get('partition_by', none) -%}\n {%- set raw_cluster_by = config.get('cluster_by', none) -%}\n {%- set sql_header = config.get('sql_header', none) -%}\n\n {%- set partition_config = adapter.parse_partition_by(raw_partition_by) -%}\n\n {{ sql_header if sql_header is not none }}\n\n create or replace table {{ relation }}\n {{ partition_by(partition_config) }}\n {{ cluster_by(raw_cluster_by) }}\n {{ bigquery_table_options(config, model, temporary) }}\n as (\n {{ compiled_code }}\n );\n {%- elif language == 'python' -%}\n {#--\n N.B. Python models _can_ write to temp views HOWEVER they use a different session\n and have already expired by the time they need to be used (I.E. in merges for incremental models)\n\n TODO: Deep dive into spark sessions to see if we can reuse a single session for an entire\n dbt invocation.\n --#}\n {{ py_write_table(compiled_code=compiled_code, target_relation=relation.quote(database=False, schema=False, identifier=False)) }}\n {%- else -%}\n {% do exceptions.raise_compiler_error(\"bigquery__create_table_as macro didn't get supported language, it got %s\" % language) %}\n {%- endif -%}\n\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_bigquery.partition_by", "macro.dbt_bigquery.cluster_by", "macro.dbt_bigquery.bigquery_table_options", "macro.dbt_bigquery.py_write_table"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.281996, "supported_languages": null}, "macro.dbt_bigquery.bigquery_view_options": {"unique_id": "macro.dbt_bigquery.bigquery_view_options", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/bigquery", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "bigquery_view_options", "macro_sql": "{% macro bigquery_view_options(config, node) %}\n {% set opts = adapter.get_view_options(config, node) %}\n {%- do return(bigquery_options(opts)) -%}\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_bigquery.bigquery_options"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.2822158, "supported_languages": null}, "macro.dbt_bigquery.bigquery__create_view_as": {"unique_id": "macro.dbt_bigquery.bigquery__create_view_as", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/bigquery", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "bigquery__create_view_as", "macro_sql": "{% macro bigquery__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\n create or replace view {{ relation }}\n {{ bigquery_view_options(config, model) }}\n as {{ sql }};\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_bigquery.bigquery_view_options"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.2825, "supported_languages": null}, "macro.dbt_bigquery.bigquery__drop_schema": {"unique_id": "macro.dbt_bigquery.bigquery__drop_schema", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/bigquery", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "bigquery__drop_schema", "macro_sql": "{% macro bigquery__drop_schema(relation) -%}\n {{ adapter.drop_schema(relation) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.282615, "supported_languages": null}, "macro.dbt_bigquery.bigquery__drop_relation": {"unique_id": "macro.dbt_bigquery.bigquery__drop_relation", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/bigquery", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "bigquery__drop_relation", "macro_sql": "{% macro bigquery__drop_relation(relation) -%}\n {% call statement('drop_relation') -%}\n drop {{ relation.type }} if exists {{ relation }}\n {%- endcall %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.2827861, "supported_languages": null}, "macro.dbt_bigquery.bigquery__get_columns_in_relation": {"unique_id": "macro.dbt_bigquery.bigquery__get_columns_in_relation", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/bigquery", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "bigquery__get_columns_in_relation", "macro_sql": "{% macro bigquery__get_columns_in_relation(relation) -%}\n {{ return(adapter.get_columns_in_relation(relation)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.282916, "supported_languages": null}, "macro.dbt_bigquery.bigquery__list_relations_without_caching": {"unique_id": "macro.dbt_bigquery.bigquery__list_relations_without_caching", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/bigquery", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "bigquery__list_relations_without_caching", "macro_sql": "{% macro bigquery__list_relations_without_caching(schema_relation) -%}\n {{ return(adapter.list_relations_without_caching(schema_relation)) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.283046, "supported_languages": null}, "macro.dbt_bigquery.bigquery__list_schemas": {"unique_id": "macro.dbt_bigquery.bigquery__list_schemas", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/bigquery", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "bigquery__list_schemas", "macro_sql": "{% macro bigquery__list_schemas(database) -%}\n {{ return(adapter.list_schemas(database)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.2831738, "supported_languages": null}, "macro.dbt_bigquery.bigquery__check_schema_exists": {"unique_id": "macro.dbt_bigquery.bigquery__check_schema_exists", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/bigquery", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "bigquery__check_schema_exists", "macro_sql": "{% macro bigquery__check_schema_exists(information_schema, schema) %}\n {{ return(adapter.check_schema_exists(information_schema.database, schema)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.2833312, "supported_languages": null}, "macro.dbt_bigquery.bigquery__persist_docs": {"unique_id": "macro.dbt_bigquery.bigquery__persist_docs", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/bigquery", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "bigquery__persist_docs", "macro_sql": "{% macro bigquery__persist_docs(relation, model, for_relation, for_columns) -%}\n {% if for_columns and config.persist_column_docs() and model.columns %}\n {% do alter_column_comment(relation, model.columns) %}\n {% endif %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.alter_column_comment"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.283648, "supported_languages": null}, "macro.dbt_bigquery.bigquery__alter_column_comment": {"unique_id": "macro.dbt_bigquery.bigquery__alter_column_comment", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/bigquery", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "bigquery__alter_column_comment", "macro_sql": "{% macro bigquery__alter_column_comment(relation, column_dict) -%}\n {% do adapter.update_columns(relation, column_dict) %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.2837849, "supported_languages": null}, "macro.dbt_bigquery.bigquery__rename_relation": {"unique_id": "macro.dbt_bigquery.bigquery__rename_relation", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/bigquery", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "bigquery__rename_relation", "macro_sql": "{% macro bigquery__rename_relation(from_relation, to_relation) -%}\n {% do adapter.rename_relation(from_relation, to_relation) %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.283919, "supported_languages": null}, "macro.dbt_bigquery.bigquery__alter_relation_add_columns": {"unique_id": "macro.dbt_bigquery.bigquery__alter_relation_add_columns", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/bigquery", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "bigquery__alter_relation_add_columns", "macro_sql": "{% macro bigquery__alter_relation_add_columns(relation, add_columns) %}\n\n {% set sql -%}\n\n alter {{ relation.type }} {{ relation }}\n {% for column in add_columns %}\n add column {{ column.name }} {{ column.data_type }}{{ ',' if not loop.last }}\n {% endfor %}\n\n {%- endset -%}\n\n {{ return(run_query(sql)) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.284263, "supported_languages": null}, "macro.dbt_bigquery.bigquery__alter_relation_drop_columns": {"unique_id": "macro.dbt_bigquery.bigquery__alter_relation_drop_columns", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/bigquery", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "bigquery__alter_relation_drop_columns", "macro_sql": "{% macro bigquery__alter_relation_drop_columns(relation, drop_columns) %}\n\n {% set sql -%}\n\n alter {{ relation.type }} {{ relation }}\n\n {% for column in drop_columns %}\n drop column {{ column.name }}{{ ',' if not loop.last }}\n {% endfor %}\n\n {%- endset -%}\n\n {{ return(run_query(sql)) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.284597, "supported_languages": null}, "macro.dbt_bigquery.bigquery__alter_column_type": {"unique_id": "macro.dbt_bigquery.bigquery__alter_column_type", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/bigquery", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "bigquery__alter_column_type", "macro_sql": "{% macro bigquery__alter_column_type(relation, column_name, new_column_type) -%}\n {#-- Changing a column's data type using a query requires you to scan the entire table.\n The query charges can be significant if the table is very large.\n\n https://cloud.google.com/bigquery/docs/manually-changing-schemas#changing_a_columns_data_type\n #}\n {% set relation_columns = get_columns_in_relation(relation) %}\n\n {% set sql %}\n select\n {%- for col in relation_columns -%}\n {% if col.column == column_name %}\n CAST({{ col.quoted }} AS {{ new_column_type }}) AS {{ col.quoted }}\n {%- else %}\n {{ col.quoted }}\n {%- endif %}\n {%- if not loop.last %},{% endif -%}\n {%- endfor %}\n from {{ relation }}\n {% endset %}\n\n {% call statement('alter_column_type') %}\n {{ create_table_as(False, relation, sql)}}\n {%- endcall %}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.get_columns_in_relation", "macro.dbt.statement", "macro.dbt.create_table_as"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.285176, "supported_languages": null}, "macro.dbt_bigquery.bigquery__test_unique": {"unique_id": "macro.dbt_bigquery.bigquery__test_unique", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/bigquery", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "bigquery__test_unique", "macro_sql": "{% macro bigquery__test_unique(model, column_name) %}\n\nwith dbt_test__target as (\n\n select {{ column_name }} as unique_field\n from {{ model }}\n where {{ column_name }} is not null\n\n)\n\nselect\n unique_field,\n count(*) as n_records\n\nfrom dbt_test__target\ngroup by unique_field\nhaving count(*) > 1\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.285321, "supported_languages": null}, "macro.dbt_bigquery.bigquery__upload_file": {"unique_id": "macro.dbt_bigquery.bigquery__upload_file", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/bigquery", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "bigquery__upload_file", "macro_sql": "{% macro bigquery__upload_file(local_file_path, database, table_schema, table_name) %}\n\n {{ log(\"kwargs: \" ~ kwargs) }}\n\n {% do adapter.upload_file(local_file_path, database, table_schema, table_name, kwargs=kwargs) %}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.2855701, "supported_languages": null}, "macro.dbt_bigquery.bigquery__create_csv_table": {"unique_id": "macro.dbt_bigquery.bigquery__create_csv_table", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/bigquery", "path": "macros/materializations/seed.sql", "original_file_path": "macros/materializations/seed.sql", "name": "bigquery__create_csv_table", "macro_sql": "{% macro bigquery__create_csv_table(model, agate_table) %}\n -- no-op\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.285911, "supported_languages": null}, "macro.dbt_bigquery.bigquery__reset_csv_table": {"unique_id": "macro.dbt_bigquery.bigquery__reset_csv_table", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/bigquery", "path": "macros/materializations/seed.sql", "original_file_path": "macros/materializations/seed.sql", "name": "bigquery__reset_csv_table", "macro_sql": "{% macro bigquery__reset_csv_table(model, full_refresh, old_relation, agate_table) %}\n {{ adapter.drop_relation(old_relation) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.286051, "supported_languages": null}, "macro.dbt_bigquery.bigquery__load_csv_rows": {"unique_id": "macro.dbt_bigquery.bigquery__load_csv_rows", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/bigquery", "path": "macros/materializations/seed.sql", "original_file_path": "macros/materializations/seed.sql", "name": "bigquery__load_csv_rows", "macro_sql": "{% macro bigquery__load_csv_rows(model, agate_table) %}\n\n {%- set column_override = model['config'].get('column_types', {}) -%}\n {{ adapter.load_dataframe(model['database'], model['schema'], model['alias'],\n \t\t\t\t\t\t\tagate_table, column_override) }}\n {% if config.persist_relation_docs() and 'description' in model %}\n\n \t{{ adapter.update_table_description(model['database'], model['schema'], model['alias'], model['description']) }}\n {% endif %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.286588, "supported_languages": null}, "macro.dbt_bigquery.bigquery__handle_existing_table": {"unique_id": "macro.dbt_bigquery.bigquery__handle_existing_table", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/bigquery", "path": "macros/materializations/view.sql", "original_file_path": "macros/materializations/view.sql", "name": "bigquery__handle_existing_table", "macro_sql": "{% macro bigquery__handle_existing_table(full_refresh, old_relation) %}\n {%- if full_refresh -%}\n {{ adapter.drop_relation(old_relation) }}\n {%- else -%}\n {{ exceptions.relation_wrong_type(old_relation, 'view') }}\n {%- endif -%}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.287138, "supported_languages": null}, "macro.dbt_bigquery.materialization_view_bigquery": {"unique_id": "macro.dbt_bigquery.materialization_view_bigquery", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/bigquery", "path": "macros/materializations/view.sql", "original_file_path": "macros/materializations/view.sql", "name": "materialization_view_bigquery", "macro_sql": "{% materialization view, adapter='bigquery' -%}\n -- grab current tables grants config for comparision later on\n {% set grant_config = config.get('grants') %}\n\n {% set to_return = create_or_replace_view() %}\n\n {% set target_relation = this.incorporate(type='view') %}\n\n {% do persist_docs(target_relation, model) %}\n\n {% if config.get('grant_access_to') %}\n {% for grant_target_dict in config.get('grant_access_to') %}\n {% do adapter.grant_access_to(this, 'view', None, grant_target_dict) %}\n {% endfor %}\n {% endif %}\n\n {% do return(to_return) %}\n\n{%- endmaterialization %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.create_or_replace_view", "macro.dbt.persist_docs"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.2877262, "supported_languages": ["sql"]}, "macro.dbt_bigquery.materialization_table_bigquery": {"unique_id": "macro.dbt_bigquery.materialization_table_bigquery", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/bigquery", "path": "macros/materializations/table.sql", "original_file_path": "macros/materializations/table.sql", "name": "materialization_table_bigquery", "macro_sql": "{% materialization table, adapter='bigquery', supported_languages=['sql', 'python']-%}\n\n {%- set language = model['language'] -%}\n {%- set identifier = model['alias'] -%}\n {%- set old_relation = adapter.get_relation(database=database, schema=schema, identifier=identifier) -%}\n {%- set exists_not_as_table = (old_relation is not none and not old_relation.is_table) -%}\n {%- set target_relation = api.Relation.create(database=database, schema=schema, identifier=identifier, type='table') -%}\n\n -- grab current tables grants config for comparision later on\n {%- set grant_config = config.get('grants') -%}\n\n {{ run_hooks(pre_hooks) }}\n\n {#\n We only need to drop this thing if it is not a table.\n If it _is_ already a table, then we can overwrite it without downtime\n Unlike table -> view, no need for `--full-refresh`: dropping a view is no big deal\n #}\n {%- if exists_not_as_table -%}\n {{ adapter.drop_relation(old_relation) }}\n {%- endif -%}\n\n -- build model\n {%- set raw_partition_by = config.get('partition_by', none) -%}\n {%- set partition_by = adapter.parse_partition_by(raw_partition_by) -%}\n {%- set cluster_by = config.get('cluster_by', none) -%}\n {% if not adapter.is_replaceable(old_relation, partition_by, cluster_by) %}\n {% do log(\"Hard refreshing \" ~ old_relation ~ \" because it is not replaceable\") %}\n {% do adapter.drop_relation(old_relation) %}\n {% endif %}\n\n -- build model\n {%- call statement('main', language=language) -%}\n {{ create_table_as(False, target_relation, compiled_code, language) }}\n {%- endcall -%}\n\n {{ run_hooks(post_hooks) }}\n\n {% set should_revoke = should_revoke(old_relation, full_refresh_mode=True) %}\n {% do apply_grants(target_relation, grant_config, should_revoke) %}\n\n {% do persist_docs(target_relation, model) %}\n\n {{ return({'relations': [target_relation]}) }}\n\n{% endmaterialization %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.run_hooks", "macro.dbt.statement", "macro.dbt.create_table_as", "macro.dbt.should_revoke", "macro.dbt.apply_grants", "macro.dbt.persist_docs"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.291169, "supported_languages": ["sql", "python"]}, "macro.dbt_bigquery.py_write_table": {"unique_id": "macro.dbt_bigquery.py_write_table", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/bigquery", "path": "macros/materializations/table.sql", "original_file_path": "macros/materializations/table.sql", "name": "py_write_table", "macro_sql": "{% macro py_write_table(compiled_code, target_relation) %}\nfrom pyspark.sql import SparkSession\n\nspark = SparkSession.builder.appName('smallTest').getOrCreate()\n\nspark.conf.set(\"viewsEnabled\",\"true\")\nspark.conf.set(\"temporaryGcsBucket\",\"{{target.gcs_bucket}}\")\n\n{{ compiled_code }}\ndbt = dbtObj(spark.read.format(\"bigquery\").load)\ndf = model(dbt, spark)\n\n# COMMAND ----------\n# this is materialization code dbt generated, please do not modify\n\nimport pyspark\n# make sure pandas exists before using it\ntry:\n import pandas\n pandas_available = True\nexcept ImportError:\n pandas_available = False\n\n# make sure pyspark.pandas exists before using it\ntry:\n import pyspark.pandas\n pyspark_pandas_api_available = True\nexcept ImportError:\n pyspark_pandas_api_available = False\n\n# make sure databricks.koalas exists before using it\ntry:\n import databricks.koalas\n koalas_available = True\nexcept ImportError:\n koalas_available = False\n\n# preferentially convert pandas DataFrames to pandas-on-Spark or Koalas DataFrames first\n# since they know how to convert pandas DataFrames better than `spark.createDataFrame(df)`\n# and converting from pandas-on-Spark to Spark DataFrame has no overhead\nif pyspark_pandas_api_available and pandas_available and isinstance(df, pandas.core.frame.DataFrame):\n df = pyspark.pandas.frame.DataFrame(df)\nelif koalas_available and pandas_available and isinstance(df, pandas.core.frame.DataFrame):\n df = databricks.koalas.frame.DataFrame(df)\n\n# convert to pyspark.sql.dataframe.DataFrame\nif isinstance(df, pyspark.sql.dataframe.DataFrame):\n pass # since it is already a Spark DataFrame\nelif pyspark_pandas_api_available and isinstance(df, pyspark.pandas.frame.DataFrame):\n df = df.to_spark()\nelif koalas_available and isinstance(df, databricks.koalas.frame.DataFrame):\n df = df.to_spark()\nelif pandas_available and isinstance(df, pandas.core.frame.DataFrame):\n df = spark.createDataFrame(df)\nelse:\n msg = f\"{type(df)} is not a supported type for dbt Python materialization\"\n raise Exception(msg)\n\ndf.write \\\n .mode(\"overwrite\") \\\n .format(\"bigquery\") \\\n .option(\"writeMethod\", \"direct\").option(\"writeDisposition\", 'WRITE_TRUNCATE') \\\n .save(\"{{target_relation}}\")\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.291581, "supported_languages": null}, "macro.dbt_bigquery.materialization_copy_bigquery": {"unique_id": "macro.dbt_bigquery.materialization_copy_bigquery", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/bigquery", "path": "macros/materializations/copy.sql", "original_file_path": "macros/materializations/copy.sql", "name": "materialization_copy_bigquery", "macro_sql": "{% materialization copy, adapter='bigquery' -%}\n\n {# Setup #}\n {{ run_hooks(pre_hooks) }}\n\n {% set destination = this.incorporate(type='table') %}\n\n {# there can be several ref() or source() according to BQ copy API docs #}\n {# cycle over ref() and source() to create source tables array #}\n {% set source_array = [] %}\n {% for ref_table in model.refs %}\n {{ source_array.append(ref(*ref_table)) }}\n {% endfor %}\n\n {% for src_table in model.sources %}\n {{ source_array.append(source(*src_table)) }}\n {% endfor %}\n\n {# Call adapter copy_table function #}\n {%- set result_str = adapter.copy_table(\n source_array,\n destination,\n config.get('copy_materialization', default = 'table')) -%}\n\n {{ store_result('main', response=result_str) }}\n\n {# Clean up #}\n {{ run_hooks(post_hooks) }}\n {%- do apply_grants(target_relation, grant_config) -%}\n {{ adapter.commit() }}\n\n {{ return({'relations': [destination]}) }}\n{%- endmaterialization %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.run_hooks", "macro.dbt.apply_grants"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.292917, "supported_languages": ["sql"]}, "macro.dbt_bigquery.declare_dbt_max_partition": {"unique_id": "macro.dbt_bigquery.declare_dbt_max_partition", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/bigquery", "path": "macros/materializations/incremental.sql", "original_file_path": "macros/materializations/incremental.sql", "name": "declare_dbt_max_partition", "macro_sql": "{% macro declare_dbt_max_partition(relation, partition_by, complied_code, language='sql') %}\n\n {#-- TODO: revisit partitioning with python models --#}\n {%- if '_dbt_max_partition' in complied_code and language == 'sql' -%}\n\n declare _dbt_max_partition {{ partition_by.data_type }} default (\n select max({{ partition_by.field }}) from {{ this }}\n where {{ partition_by.field }} is not null\n );\n\n {%- endif -%}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.2951, "supported_languages": null}, "macro.dbt_bigquery.dbt_bigquery_validate_get_incremental_strategy": {"unique_id": "macro.dbt_bigquery.dbt_bigquery_validate_get_incremental_strategy", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/bigquery", "path": "macros/materializations/incremental.sql", "original_file_path": "macros/materializations/incremental.sql", "name": "dbt_bigquery_validate_get_incremental_strategy", "macro_sql": "{% macro dbt_bigquery_validate_get_incremental_strategy(config) %}\n {#-- Find and validate the incremental strategy #}\n {%- set strategy = config.get(\"incremental_strategy\") or 'merge' -%}\n\n {% set invalid_strategy_msg -%}\n Invalid incremental strategy provided: {{ strategy }}\n Expected one of: 'merge', 'insert_overwrite'\n {%- endset %}\n {% if strategy not in ['merge', 'insert_overwrite'] %}\n {% do exceptions.raise_compiler_error(invalid_strategy_msg) %}\n {% endif %}\n\n {% do return(strategy) %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.295496, "supported_languages": null}, "macro.dbt_bigquery.bq_insert_overwrite": {"unique_id": "macro.dbt_bigquery.bq_insert_overwrite", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/bigquery", "path": "macros/materializations/incremental.sql", "original_file_path": "macros/materializations/incremental.sql", "name": "bq_insert_overwrite", "macro_sql": "{% macro bq_insert_overwrite(\n tmp_relation, target_relation, sql, unique_key, partition_by, partitions, dest_columns, tmp_relation_exists\n) %}\n\n {% if partitions is not none and partitions != [] %} {# static #}\n\n {% set predicate -%}\n {{ partition_by.render(alias='DBT_INTERNAL_DEST') }} in (\n {{ partitions | join (', ') }}\n )\n {%- endset %}\n\n {%- set source_sql -%}\n (\n {{sql}}\n )\n {%- endset -%}\n\n {#-- Because we're putting the model SQL _directly_ into the MERGE statement,\n we need to prepend the MERGE statement with the user-configured sql_header,\n which may be needed to resolve that model SQL (e.g. referencing a variable or UDF in the header)\n in the \"dynamic\" case, we save the model SQL result as a temp table first, wherein the\n sql_header is included by the create_table_as macro.\n #}\n {{ get_insert_overwrite_merge_sql(target_relation, source_sql, dest_columns, [predicate], include_sql_header=true) }}\n\n {% else %} {# dynamic #}\n\n {% set predicate -%}\n {{ partition_by.render(alias='DBT_INTERNAL_DEST') }} in unnest(dbt_partitions_for_replacement)\n {%- endset %}\n\n {%- set source_sql -%}\n (\n select * from {{ tmp_relation }}\n )\n {%- endset -%}\n\n -- generated script to merge partitions into {{ target_relation }}\n declare dbt_partitions_for_replacement array<{{ partition_by.data_type }}>;\n\n {# have we already created the temp table to check for schema changes? #}\n {% if not tmp_relation_exists %}\n {{ declare_dbt_max_partition(this, partition_by, sql) }}\n\n -- 1. create a temp table\n {{ create_table_as(True, tmp_relation, compiled_code) }}\n {% else %}\n -- 1. temp table already exists, we used it to check for schema changes\n {% endif %}\n\n -- 2. define partitions to update\n set (dbt_partitions_for_replacement) = (\n select as struct\n array_agg(distinct {{ partition_by.render() }})\n from {{ tmp_relation }}\n );\n\n -- 3. run the merge statement\n {{ get_insert_overwrite_merge_sql(target_relation, source_sql, dest_columns, [predicate]) }};\n\n -- 4. clean up the temp table\n drop table if exists {{ tmp_relation }}\n\n {% endif %}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.get_insert_overwrite_merge_sql", "macro.dbt_bigquery.declare_dbt_max_partition", "macro.dbt.create_table_as"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.296596, "supported_languages": null}, "macro.dbt_bigquery.bq_generate_incremental_build_sql": {"unique_id": "macro.dbt_bigquery.bq_generate_incremental_build_sql", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/bigquery", "path": "macros/materializations/incremental.sql", "original_file_path": "macros/materializations/incremental.sql", "name": "bq_generate_incremental_build_sql", "macro_sql": "{% macro bq_generate_incremental_build_sql(\n strategy, tmp_relation, target_relation, sql, unique_key, partition_by, partitions, dest_columns, tmp_relation_exists\n) %}\n {#-- if partitioned, use BQ scripting to get the range of partition values to be updated --#}\n {% if strategy == 'insert_overwrite' %}\n\n {% set missing_partition_msg -%}\n The 'insert_overwrite' strategy requires the `partition_by` config.\n {%- endset %}\n {% if partition_by is none %}\n {% do exceptions.raise_compiler_error(missing_partition_msg) %}\n {% endif %}\n\n {% set build_sql = bq_insert_overwrite(\n tmp_relation, target_relation, sql, unique_key, partition_by, partitions, dest_columns, tmp_relation_exists\n ) %}\n\n {% else %} {# strategy == 'merge' #}\n {%- set source_sql -%}\n {%- if tmp_relation_exists -%}\n (\n select * from {{ tmp_relation }}\n )\n {%- else -%} {#-- wrap sql in parens to make it a subquery --#}\n (\n {{sql}}\n )\n {%- endif -%}\n {%- endset -%}\n\n {% set build_sql = get_merge_sql(target_relation, source_sql, unique_key, dest_columns) %}\n\n {% endif %}\n\n {{ return(build_sql) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_bigquery.bq_insert_overwrite", "macro.dbt.get_merge_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.297357, "supported_languages": null}, "macro.dbt_bigquery.materialization_incremental_bigquery": {"unique_id": "macro.dbt_bigquery.materialization_incremental_bigquery", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/bigquery", "path": "macros/materializations/incremental.sql", "original_file_path": "macros/materializations/incremental.sql", "name": "materialization_incremental_bigquery", "macro_sql": "{% materialization incremental, adapter='bigquery', supported_languages=['sql', 'python'] -%}\n\n {%- set unique_key = config.get('unique_key') -%}\n {%- set full_refresh_mode = (should_full_refresh()) -%}\n {%- set language = model['language'] %}\n\n {%- set target_relation = this %}\n {%- set existing_relation = load_relation(this) %}\n {%- set tmp_relation = make_temp_relation(this) %}\n\n {#-- Validate early so we don't run SQL if the strategy is invalid --#}\n {% set strategy = dbt_bigquery_validate_get_incremental_strategy(config) -%}\n\n {%- set raw_partition_by = config.get('partition_by', none) -%}\n {%- set partition_by = adapter.parse_partition_by(raw_partition_by) -%}\n {%- set partitions = config.get('partitions', none) -%}\n {%- set cluster_by = config.get('cluster_by', none) -%}\n\n {% set on_schema_change = incremental_validate_on_schema_change(config.get('on_schema_change'), default='ignore') %}\n\n -- grab current tables grants config for comparision later on\n {% set grant_config = config.get('grants') %}\n\n {{ run_hooks(pre_hooks) }}\n\n {% if existing_relation is none %}\n {%- call statement('main', language=language) -%}\n {{ create_table_as(False, target_relation, compiled_code, language) }}\n {%- endcall -%}\n\n {% elif existing_relation.is_view %}\n {#-- There's no way to atomically replace a view with a table on BQ --#}\n {{ adapter.drop_relation(existing_relation) }}\n {%- call statement('main', language=language) -%}\n {{ create_table_as(False, target_relation, compiled_code, language) }}\n {%- endcall -%}\n\n {% elif full_refresh_mode %}\n {#-- If the partition/cluster config has changed, then we must drop and recreate --#}\n {% if not adapter.is_replaceable(existing_relation, partition_by, cluster_by) %}\n {% do log(\"Hard refreshing \" ~ existing_relation ~ \" because it is not replaceable\") %}\n {{ adapter.drop_relation(existing_relation) }}\n {% endif %}\n {%- call statement('main', language=language) -%}\n {{ create_table_as(False, target_relation, compiled_code, language) }}\n {%- endcall -%}\n\n {% else %}\n {%- if language == 'python' and strategy == 'insert_overwrite' -%}\n {#-- This lets us move forward assuming no python will be directly templated into a query --#}\n {%- set python_unsupported_msg -%}\n The 'insert_overwrite' strategy is not yet supported for python models.\n {%- endset %}\n {% do exceptions.raise_compiler_error(python_unsupported_msg) %}\n {%- endif -%}\n\n {% set tmp_relation_exists = false %}\n {% if on_schema_change != 'ignore' or language == 'python' %}\n {#-- Check first, since otherwise we may not build a temp table --#}\n {#-- Python always needs to create a temp table --#}\n {%- call statement('create_tmp_relation', language=language) -%}\n {{ declare_dbt_max_partition(this, partition_by, compiled_code, language) +\n create_table_as(True, tmp_relation, compiled_code, language)\n }}\n {%- endcall -%}\n {% set tmp_relation_exists = true %}\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, tmp_relation, existing_relation) %}\n {% endif %}\n\n {% if not dest_columns %}\n {% set dest_columns = adapter.get_columns_in_relation(existing_relation) %}\n {% endif %}\n {% set build_sql = bq_generate_incremental_build_sql(\n strategy, tmp_relation, target_relation, compiled_code, unique_key, partition_by, partitions, dest_columns, tmp_relation_exists\n ) %}\n\n {%- call statement('main') -%}\n {{ build_sql }}\n {% endcall %}\n\n {%- if language == 'python' and tmp_relation -%}\n {{ adapter.drop_relation(tmp_relation) }}\n {%- endif -%}\n\n {% endif %}\n\n {{ run_hooks(post_hooks) }}\n\n {% set target_relation = this.incorporate(type='table') %}\n\n {% set should_revoke = should_revoke(existing_relation, full_refresh_mode) %}\n {% do apply_grants(target_relation, grant_config, should_revoke) %}\n\n {% do persist_docs(target_relation, model) %}\n\n {{ return({'relations': [target_relation]}) }}\n\n{%- endmaterialization %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.should_full_refresh", "macro.dbt.load_relation", "macro.dbt.make_temp_relation", "macro.dbt_bigquery.dbt_bigquery_validate_get_incremental_strategy", "macro.dbt.incremental_validate_on_schema_change", "macro.dbt.run_hooks", "macro.dbt.statement", "macro.dbt.create_table_as", "macro.dbt_bigquery.declare_dbt_max_partition", "macro.dbt.process_schema_changes", "macro.dbt_bigquery.bq_generate_incremental_build_sql", "macro.dbt.should_revoke", "macro.dbt.apply_grants", "macro.dbt.persist_docs"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.300479, "supported_languages": ["sql", "python"]}, "macro.dbt_bigquery.bigquery__snapshot_hash_arguments": {"unique_id": "macro.dbt_bigquery.bigquery__snapshot_hash_arguments", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/bigquery", "path": "macros/materializations/snapshot.sql", "original_file_path": "macros/materializations/snapshot.sql", "name": "bigquery__snapshot_hash_arguments", "macro_sql": "{% macro bigquery__snapshot_hash_arguments(args) -%}\n to_hex(md5(concat({%- for arg in args -%}\n coalesce(cast({{ arg }} as string), ''){% if not loop.last %}, '|',{% endif -%}\n {%- endfor -%}\n )))\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.3009222, "supported_languages": null}, "macro.dbt_bigquery.bigquery__create_columns": {"unique_id": "macro.dbt_bigquery.bigquery__create_columns", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/bigquery", "path": "macros/materializations/snapshot.sql", "original_file_path": "macros/materializations/snapshot.sql", "name": "bigquery__create_columns", "macro_sql": "{% macro bigquery__create_columns(relation, columns) %}\n {{ adapter.alter_table_add_columns(relation, columns) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.3010628, "supported_languages": null}, "macro.dbt_bigquery.bigquery__post_snapshot": {"unique_id": "macro.dbt_bigquery.bigquery__post_snapshot", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/bigquery", "path": "macros/materializations/snapshot.sql", "original_file_path": "macros/materializations/snapshot.sql", "name": "bigquery__post_snapshot", "macro_sql": "{% macro bigquery__post_snapshot(staging_relation) %}\n -- Clean up the snapshot temp table\n {% do drop_relation(staging_relation) %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.drop_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.301179, "supported_languages": null}, "macro.dbt_bigquery.bigquery__except": {"unique_id": "macro.dbt_bigquery.bigquery__except", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/bigquery", "path": "macros/utils/except.sql", "original_file_path": "macros/utils/except.sql", "name": "bigquery__except", "macro_sql": "{% macro bigquery__except() %}\n\n except distinct\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.301337, "supported_languages": null}, "macro.dbt_bigquery.bigquery__dateadd": {"unique_id": "macro.dbt_bigquery.bigquery__dateadd", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/bigquery", "path": "macros/utils/dateadd.sql", "original_file_path": "macros/utils/dateadd.sql", "name": "bigquery__dateadd", "macro_sql": "{% macro bigquery__dateadd(datepart, interval, from_date_or_timestamp) %}\n\n datetime_add(\n cast( {{ from_date_or_timestamp }} as datetime),\n interval {{ interval }} {{ datepart }}\n )\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.301593, "supported_languages": null}, "macro.dbt_bigquery.bigquery__current_timestamp": {"unique_id": "macro.dbt_bigquery.bigquery__current_timestamp", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/bigquery", "path": "macros/utils/timestamps.sql", "original_file_path": "macros/utils/timestamps.sql", "name": "bigquery__current_timestamp", "macro_sql": "{% macro bigquery__current_timestamp() -%}\n current_timestamp()\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.301794, "supported_languages": null}, "macro.dbt_bigquery.bigquery__snapshot_string_as_time": {"unique_id": "macro.dbt_bigquery.bigquery__snapshot_string_as_time", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/bigquery", "path": "macros/utils/timestamps.sql", "original_file_path": "macros/utils/timestamps.sql", "name": "bigquery__snapshot_string_as_time", "macro_sql": "{% macro bigquery__snapshot_string_as_time(timestamp) -%}\n {%- set result = 'TIMESTAMP(\"' ~ timestamp ~ '\")' -%}\n {{ return(result) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.30195, "supported_languages": null}, "macro.dbt_bigquery.bigquery__current_timestamp_backcompat": {"unique_id": "macro.dbt_bigquery.bigquery__current_timestamp_backcompat", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/bigquery", "path": "macros/utils/timestamps.sql", "original_file_path": "macros/utils/timestamps.sql", "name": "bigquery__current_timestamp_backcompat", "macro_sql": "{% macro bigquery__current_timestamp_backcompat() -%}\n current_timestamp\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.30202, "supported_languages": null}, "macro.dbt_bigquery.bigquery__intersect": {"unique_id": "macro.dbt_bigquery.bigquery__intersect", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/bigquery", "path": "macros/utils/intersect.sql", "original_file_path": "macros/utils/intersect.sql", "name": "bigquery__intersect", "macro_sql": "{% macro bigquery__intersect() %}\n\n intersect distinct\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.302169, "supported_languages": null}, "macro.dbt_bigquery.bigquery__escape_single_quotes": {"unique_id": "macro.dbt_bigquery.bigquery__escape_single_quotes", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/bigquery", "path": "macros/utils/escape_single_quotes.sql", "original_file_path": "macros/utils/escape_single_quotes.sql", "name": "bigquery__escape_single_quotes", "macro_sql": "{% macro bigquery__escape_single_quotes(expression) -%}\n{{ expression | replace(\"'\", \"\\\\'\") }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.302402, "supported_languages": null}, "macro.dbt_bigquery.bigquery__right": {"unique_id": "macro.dbt_bigquery.bigquery__right", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/bigquery", "path": "macros/utils/right.sql", "original_file_path": "macros/utils/right.sql", "name": "bigquery__right", "macro_sql": "{% macro bigquery__right(string_text, length_expression) %}\n\n case when {{ length_expression }} = 0\n then ''\n else\n substr(\n {{ string_text }},\n -1 * ({{ length_expression }})\n )\n end\n\n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.30266, "supported_languages": null}, "macro.dbt_bigquery.bigquery__listagg": {"unique_id": "macro.dbt_bigquery.bigquery__listagg", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/bigquery", "path": "macros/utils/listagg.sql", "original_file_path": "macros/utils/listagg.sql", "name": "bigquery__listagg", "macro_sql": "{% macro bigquery__listagg(measure, delimiter_text, order_by_clause, limit_num) -%}\n\n string_agg(\n {{ measure }},\n {{ delimiter_text }}\n {% if order_by_clause -%}\n {{ order_by_clause }}\n {%- endif %}\n {% if limit_num -%}\n limit {{ limit_num }}\n {%- endif %}\n )\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.303055, "supported_languages": null}, "macro.dbt_bigquery.bigquery__datediff": {"unique_id": "macro.dbt_bigquery.bigquery__datediff", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/bigquery", "path": "macros/utils/datediff.sql", "original_file_path": "macros/utils/datediff.sql", "name": "bigquery__datediff", "macro_sql": "{% macro bigquery__datediff(first_date, second_date, datepart) -%}\n\n {% if dbt_version[0] == 1 and dbt_version[2] >= 2 %}\n {{ return(dbt.datediff(first_date, second_date, datepart)) }}\n {% else %}\n\n datetime_diff(\n cast({{second_date}} as datetime),\n cast({{first_date}} as datetime),\n {{datepart}}\n )\n\n {% endif %}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.datediff"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.3035479, "supported_languages": null}, "macro.dbt_bigquery.bigquery__safe_cast": {"unique_id": "macro.dbt_bigquery.bigquery__safe_cast", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/bigquery", "path": "macros/utils/safe_cast.sql", "original_file_path": "macros/utils/safe_cast.sql", "name": "bigquery__safe_cast", "macro_sql": "{% macro bigquery__safe_cast(field, type) %}\n safe_cast({{field}} as {{type}})\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.303763, "supported_languages": null}, "macro.dbt_bigquery.bigquery__hash": {"unique_id": "macro.dbt_bigquery.bigquery__hash", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/bigquery", "path": "macros/utils/hash.sql", "original_file_path": "macros/utils/hash.sql", "name": "bigquery__hash", "macro_sql": "{% macro bigquery__hash(field) -%}\n to_hex({{dbt.default__hash(field)}})\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__hash"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.3039842, "supported_languages": null}, "macro.dbt_bigquery.bigquery__position": {"unique_id": "macro.dbt_bigquery.bigquery__position", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/bigquery", "path": "macros/utils/position.sql", "original_file_path": "macros/utils/position.sql", "name": "bigquery__position", "macro_sql": "{% macro bigquery__position(substring_text, string_text) %}\n\n strpos(\n {{ string_text }},\n {{ substring_text }}\n\n )\n\n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.30421, "supported_languages": null}, "macro.dbt_bigquery.bigquery__array_concat": {"unique_id": "macro.dbt_bigquery.bigquery__array_concat", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/bigquery", "path": "macros/utils/array_concat.sql", "original_file_path": "macros/utils/array_concat.sql", "name": "bigquery__array_concat", "macro_sql": "{% macro bigquery__array_concat(array_1, array_2) -%}\n array_concat({{ array_1 }}, {{ array_2 }})\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.304408, "supported_languages": null}, "macro.dbt_bigquery.bigquery__bool_or": {"unique_id": "macro.dbt_bigquery.bigquery__bool_or", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/bigquery", "path": "macros/utils/bool_or.sql", "original_file_path": "macros/utils/bool_or.sql", "name": "bigquery__bool_or", "macro_sql": "{% macro bigquery__bool_or(expression) -%}\n\n logical_or({{ expression }})\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.304584, "supported_languages": null}, "macro.dbt_bigquery.bigquery__split_part": {"unique_id": "macro.dbt_bigquery.bigquery__split_part", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/bigquery", "path": "macros/utils/split_part.sql", "original_file_path": "macros/utils/split_part.sql", "name": "bigquery__split_part", "macro_sql": "{% macro bigquery__split_part(string_text, delimiter_text, part_number) %}\n\n {% if part_number >= 0 %}\n split(\n {{ string_text }},\n {{ delimiter_text }}\n )[safe_offset({{ part_number - 1 }})]\n {% else %}\n split(\n {{ string_text }},\n {{ delimiter_text }}\n )[safe_offset(\n length({{ string_text }})\n - length(\n replace({{ string_text }}, {{ delimiter_text }}, '')\n ) + 1\n )]\n {% endif %}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.305231, "supported_languages": null}, "macro.dbt_bigquery.bigquery__date_trunc": {"unique_id": "macro.dbt_bigquery.bigquery__date_trunc", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/bigquery", "path": "macros/utils/date_trunc.sql", "original_file_path": "macros/utils/date_trunc.sql", "name": "bigquery__date_trunc", "macro_sql": "{% macro bigquery__date_trunc(datepart, date) -%}\n timestamp_trunc(\n cast({{date}} as timestamp),\n {{datepart}}\n )\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.3054469, "supported_languages": null}, "macro.dbt_bigquery.bigquery__array_construct": {"unique_id": "macro.dbt_bigquery.bigquery__array_construct", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/bigquery", "path": "macros/utils/array_construct.sql", "original_file_path": "macros/utils/array_construct.sql", "name": "bigquery__array_construct", "macro_sql": "{% macro bigquery__array_construct(inputs, data_type) -%}\n {% if inputs|length > 0 %}\n [ {{ inputs|join(' , ') }} ]\n {% else %}\n ARRAY<{{data_type}}>[]\n {% endif %}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.3057659, "supported_languages": null}, "macro.dbt_bigquery.bigquery__array_append": {"unique_id": "macro.dbt_bigquery.bigquery__array_append", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/bigquery", "path": "macros/utils/array_append.sql", "original_file_path": "macros/utils/array_append.sql", "name": "bigquery__array_append", "macro_sql": "{% macro bigquery__array_append(array, new_element) -%}\n {{ array_concat(array, array_construct([new_element])) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.array_concat", "macro.dbt.array_construct"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.3060029, "supported_languages": null}, "macro.dbt_bigquery.bigquery__get_show_grant_sql": {"unique_id": "macro.dbt_bigquery.bigquery__get_show_grant_sql", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/bigquery", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "name": "bigquery__get_show_grant_sql", "macro_sql": "{% macro bigquery__get_show_grant_sql(relation) %}\n {% set location = adapter.get_dataset_location(relation) %}\n {% set relation = relation.incorporate(location=location) %}\n\n select privilege_type, grantee\n from {{ relation.information_schema(\"OBJECT_PRIVILEGES\") }}\n where object_schema = \"{{ relation.dataset }}\"\n and object_name = \"{{ relation.identifier }}\"\n -- filter out current user\n and split(grantee, ':')[offset(1)] != session_user()\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.306623, "supported_languages": null}, "macro.dbt_bigquery.bigquery__get_grant_sql": {"unique_id": "macro.dbt_bigquery.bigquery__get_grant_sql", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/bigquery", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "name": "bigquery__get_grant_sql", "macro_sql": "\n\n\n{%- macro bigquery__get_grant_sql(relation, privilege, grantee) -%}\n grant `{{ privilege }}` on {{ relation.type }} {{ relation }} to {{ '\\\"' + grantee|join('\\\", \\\"') + '\\\"' }}\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.306838, "supported_languages": null}, "macro.dbt_bigquery.bigquery__get_revoke_sql": {"unique_id": "macro.dbt_bigquery.bigquery__get_revoke_sql", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/bigquery", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "name": "bigquery__get_revoke_sql", "macro_sql": "{%- macro bigquery__get_revoke_sql(relation, privilege, grantee) -%}\n revoke `{{ privilege }}` on {{ relation.type }} {{ relation }} from {{ '\\\"' + grantee|join('\\\", \\\"') + '\\\"' }}\n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.307046, "supported_languages": null}, "macro.dbt.run_hooks": {"unique_id": "macro.dbt.run_hooks", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/hooks.sql", "original_file_path": "macros/materializations/hooks.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.308046, "supported_languages": null}, "macro.dbt.make_hook_config": {"unique_id": "macro.dbt.make_hook_config", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/hooks.sql", "original_file_path": "macros/materializations/hooks.sql", "name": "make_hook_config", "macro_sql": "{% macro make_hook_config(sql, inside_transaction) %}\n {{ tojson({\"sql\": sql, \"transaction\": inside_transaction}) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.308219, "supported_languages": null}, "macro.dbt.before_begin": {"unique_id": "macro.dbt.before_begin", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/hooks.sql", "original_file_path": "macros/materializations/hooks.sql", "name": "before_begin", "macro_sql": "{% macro before_begin(sql) %}\n {{ make_hook_config(sql, inside_transaction=False) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.make_hook_config"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.308346, "supported_languages": null}, "macro.dbt.in_transaction": {"unique_id": "macro.dbt.in_transaction", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/hooks.sql", "original_file_path": "macros/materializations/hooks.sql", "name": "in_transaction", "macro_sql": "{% macro in_transaction(sql) %}\n {{ make_hook_config(sql, inside_transaction=True) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.make_hook_config"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.308473, "supported_languages": null}, "macro.dbt.after_commit": {"unique_id": "macro.dbt.after_commit", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/hooks.sql", "original_file_path": "macros/materializations/hooks.sql", "name": "after_commit", "macro_sql": "{% macro after_commit(sql) %}\n {{ make_hook_config(sql, inside_transaction=False) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.make_hook_config"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.308596, "supported_languages": null}, "macro.dbt.set_sql_header": {"unique_id": "macro.dbt.set_sql_header", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/configs.sql", "original_file_path": "macros/materializations/configs.sql", "name": "set_sql_header", "macro_sql": "{% macro set_sql_header(config) -%}\n {{ config.set('sql_header', caller()) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.308977, "supported_languages": null}, "macro.dbt.should_full_refresh": {"unique_id": "macro.dbt.should_full_refresh", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/configs.sql", "original_file_path": "macros/materializations/configs.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.30924, "supported_languages": null}, "macro.dbt.should_store_failures": {"unique_id": "macro.dbt.should_store_failures", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/configs.sql", "original_file_path": "macros/materializations/configs.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.3094988, "supported_languages": null}, "macro.dbt.snapshot_merge_sql": {"unique_id": "macro.dbt.snapshot_merge_sql", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/snapshot_merge.sql", "original_file_path": "macros/materializations/snapshots/snapshot_merge.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__snapshot_merge_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.309938, "supported_languages": null}, "macro.dbt.default__snapshot_merge_sql": {"unique_id": "macro.dbt.default__snapshot_merge_sql", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/snapshot_merge.sql", "original_file_path": "macros/materializations/snapshots/snapshot_merge.sql", "name": "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 merge into {{ target }} as DBT_INTERNAL_DEST\n using {{ source }} as DBT_INTERNAL_SOURCE\n on DBT_INTERNAL_SOURCE.dbt_scd_id = DBT_INTERNAL_DEST.dbt_scd_id\n\n when matched\n and DBT_INTERNAL_DEST.dbt_valid_to is null\n and DBT_INTERNAL_SOURCE.dbt_change_type in ('update', 'delete')\n then update\n set dbt_valid_to = DBT_INTERNAL_SOURCE.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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.310179, "supported_languages": null}, "macro.dbt.strategy_dispatch": {"unique_id": "macro.dbt.strategy_dispatch", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.3132741, "supported_languages": null}, "macro.dbt.snapshot_hash_arguments": {"unique_id": "macro.dbt.snapshot_hash_arguments", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "name": "snapshot_hash_arguments", "macro_sql": "{% macro snapshot_hash_arguments(args) -%}\n {{ adapter.dispatch('snapshot_hash_arguments', 'dbt')(args) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_bigquery.bigquery__snapshot_hash_arguments"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.3134248, "supported_languages": null}, "macro.dbt.default__snapshot_hash_arguments": {"unique_id": "macro.dbt.default__snapshot_hash_arguments", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.3136199, "supported_languages": null}, "macro.dbt.snapshot_timestamp_strategy": {"unique_id": "macro.dbt.snapshot_timestamp_strategy", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "name": "snapshot_timestamp_strategy", "macro_sql": "{% macro snapshot_timestamp_strategy(node, snapshotted_rel, current_rel, config, target_exists) %}\n {% set primary_key = config['unique_key'] %}\n {% set updated_at = config['updated_at'] %}\n {% set invalidate_hard_deletes = config.get('invalidate_hard_deletes', false) %}\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 }}.dbt_valid_from < {{ current_rel }}.{{ updated_at }})\n {%- endset %}\n\n {% set scd_id_expr = snapshot_hash_arguments([primary_key, updated_at]) %}\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 }) %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.snapshot_hash_arguments"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.314261, "supported_languages": null}, "macro.dbt.snapshot_string_as_time": {"unique_id": "macro.dbt.snapshot_string_as_time", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "name": "snapshot_string_as_time", "macro_sql": "{% macro snapshot_string_as_time(timestamp) -%}\n {{ adapter.dispatch('snapshot_string_as_time', 'dbt')(timestamp) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_bigquery.bigquery__snapshot_string_as_time"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.3144078, "supported_languages": null}, "macro.dbt.default__snapshot_string_as_time": {"unique_id": "macro.dbt.default__snapshot_string_as_time", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.314559, "supported_languages": null}, "macro.dbt.snapshot_check_all_get_existing_columns": {"unique_id": "macro.dbt.snapshot_check_all_get_existing_columns", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "name": "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 select {{ check_cols_config | join(', ') }} from ({{ node['compiled_code'] }}) 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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.get_columns_in_query"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.315794, "supported_languages": null}, "macro.dbt.snapshot_check_strategy": {"unique_id": "macro.dbt.snapshot_check_strategy", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "name": "snapshot_check_strategy", "macro_sql": "{% macro snapshot_check_strategy(node, snapshotted_rel, current_rel, config, target_exists) %}\n {% set check_cols_config = config['check_cols'] %}\n {% set primary_key = config['unique_key'] %}\n {% set invalidate_hard_deletes = config.get('invalidate_hard_deletes', false) %}\n {% set updated_at = config.get('updated_at', 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_id_expr = snapshot_hash_arguments([primary_key, updated_at]) %}\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 }) %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "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}, "patch_path": null, "arguments": [], "created_at": 1666728757.3170009, "supported_languages": null}, "macro.dbt.create_columns": {"unique_id": "macro.dbt.create_columns", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "name": "create_columns", "macro_sql": "{% macro create_columns(relation, columns) %}\n {{ adapter.dispatch('create_columns', 'dbt')(relation, columns) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_bigquery.bigquery__create_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.3204129, "supported_languages": null}, "macro.dbt.default__create_columns": {"unique_id": "macro.dbt.default__create_columns", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "name": "default__create_columns", "macro_sql": "{% macro default__create_columns(relation, columns) %}\n {% for column in columns %}\n {% call statement() %}\n alter table {{ relation }} add column \"{{ column.name }}\" {{ column.data_type }};\n {% endcall %}\n {% endfor %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.3206668, "supported_languages": null}, "macro.dbt.post_snapshot": {"unique_id": "macro.dbt.post_snapshot", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "name": "post_snapshot", "macro_sql": "{% macro post_snapshot(staging_relation) %}\n {{ adapter.dispatch('post_snapshot', 'dbt')(staging_relation) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_bigquery.bigquery__post_snapshot"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.320819, "supported_languages": null}, "macro.dbt.default__post_snapshot": {"unique_id": "macro.dbt.default__post_snapshot", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "name": "default__post_snapshot", "macro_sql": "{% macro default__post_snapshot(staging_relation) %}\n {# no-op #}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.3209012, "supported_languages": null}, "macro.dbt.get_true_sql": {"unique_id": "macro.dbt.get_true_sql", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "name": "get_true_sql", "macro_sql": "{% macro get_true_sql() %}\n {{ adapter.dispatch('get_true_sql', 'dbt')() }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__get_true_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.321032, "supported_languages": null}, "macro.dbt.default__get_true_sql": {"unique_id": "macro.dbt.default__get_true_sql", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "name": "default__get_true_sql", "macro_sql": "{% macro default__get_true_sql() %}\n {{ return('TRUE') }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.3211362, "supported_languages": null}, "macro.dbt.snapshot_staging_table": {"unique_id": "macro.dbt.snapshot_staging_table", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__snapshot_staging_table"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.321325, "supported_languages": null}, "macro.dbt.default__snapshot_staging_table": {"unique_id": "macro.dbt.default__snapshot_staging_table", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "name": "default__snapshot_staging_table", "macro_sql": "{% macro default__snapshot_staging_table(strategy, source_sql, target_relation) -%}\n\n with snapshot_query as (\n\n {{ source_sql }}\n\n ),\n\n snapshotted_data as (\n\n select *,\n {{ strategy.unique_key }} as dbt_unique_key\n\n from {{ target_relation }}\n where dbt_valid_to is null\n\n ),\n\n insertions_source_data as (\n\n select\n *,\n {{ strategy.unique_key }} as dbt_unique_key,\n {{ strategy.updated_at }} as dbt_updated_at,\n {{ strategy.updated_at }} as dbt_valid_from,\n nullif({{ strategy.updated_at }}, {{ strategy.updated_at }}) as dbt_valid_to,\n {{ strategy.scd_id }} as dbt_scd_id\n\n from snapshot_query\n ),\n\n updates_source_data as (\n\n select\n *,\n {{ strategy.unique_key }} as dbt_unique_key,\n {{ strategy.updated_at }} as dbt_updated_at,\n {{ strategy.updated_at }} as dbt_valid_from,\n {{ strategy.updated_at }} as dbt_valid_to\n\n from snapshot_query\n ),\n\n {%- if strategy.invalidate_hard_deletes %}\n\n deletes_source_data as (\n\n select\n *,\n {{ strategy.unique_key }} as dbt_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\n from insertions_source_data as source_data\n left outer join snapshotted_data on snapshotted_data.dbt_unique_key = source_data.dbt_unique_key\n where snapshotted_data.dbt_unique_key is null\n or (\n snapshotted_data.dbt_unique_key is not null\n and (\n {{ strategy.row_changed }}\n )\n )\n\n ),\n\n updates as (\n\n select\n 'update' as dbt_change_type,\n source_data.*,\n snapshotted_data.dbt_scd_id\n\n from updates_source_data as source_data\n join snapshotted_data on snapshotted_data.dbt_unique_key = source_data.dbt_unique_key\n where (\n {{ strategy.row_changed }}\n )\n )\n\n {%- if strategy.invalidate_hard_deletes -%}\n ,\n\n deletes as (\n\n select\n 'delete' as dbt_change_type,\n source_data.*,\n {{ snapshot_get_time() }} as dbt_valid_from,\n {{ snapshot_get_time() }} as dbt_updated_at,\n {{ snapshot_get_time() }} as dbt_valid_to,\n snapshotted_data.dbt_scd_id\n\n from snapshotted_data\n left join deletes_source_data as source_data on snapshotted_data.dbt_unique_key = source_data.dbt_unique_key\n where source_data.dbt_unique_key is null\n )\n {%- endif %}\n\n select * from insertions\n union all\n select * from updates\n {%- if strategy.invalidate_hard_deletes %}\n union all\n select * from deletes\n {%- endif %}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.snapshot_get_time"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.322121, "supported_languages": null}, "macro.dbt.build_snapshot_table": {"unique_id": "macro.dbt.build_snapshot_table", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "name": "build_snapshot_table", "macro_sql": "{% macro build_snapshot_table(strategy, sql) -%}\n {{ adapter.dispatch('build_snapshot_table', 'dbt')(strategy, sql) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__build_snapshot_table"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.322303, "supported_languages": null}, "macro.dbt.default__build_snapshot_table": {"unique_id": "macro.dbt.default__build_snapshot_table", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "name": "default__build_snapshot_table", "macro_sql": "{% macro default__build_snapshot_table(strategy, sql) %}\n\n select *,\n {{ strategy.scd_id }} as dbt_scd_id,\n {{ strategy.updated_at }} as dbt_updated_at,\n {{ strategy.updated_at }} as dbt_valid_from,\n nullif({{ strategy.updated_at }}, {{ strategy.updated_at }}) as dbt_valid_to\n from (\n {{ sql }}\n ) sbq\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.322531, "supported_languages": null}, "macro.dbt.build_snapshot_staging_table": {"unique_id": "macro.dbt.build_snapshot_staging_table", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "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}, "patch_path": null, "arguments": [], "created_at": 1666728757.322923, "supported_languages": null}, "macro.dbt.materialization_snapshot_default": {"unique_id": "macro.dbt.materialization_snapshot_default", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/snapshot.sql", "original_file_path": "macros/materializations/snapshots/snapshot.sql", "name": "materialization_snapshot_default", "macro_sql": "{% materialization snapshot, default %}\n {%- set config = model['config'] -%}\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 {% set strategy = strategy_macro(model, \"snapshotted_data\", \"source_data\", 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 final_sql = create_table_as(False, target_relation, build_sql) %}\n\n {% else %}\n\n {{ adapter.valid_snapshot_target(target_relation) }}\n\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 missing_columns = adapter.get_missing_columns(staging_table, target_relation)\n | rejectattr('name', 'equalto', 'dbt_change_type')\n | rejectattr('name', 'equalto', 'DBT_CHANGE_TYPE')\n | rejectattr('name', 'equalto', 'dbt_unique_key')\n | rejectattr('name', 'equalto', 'DBT_UNIQUE_KEY')\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', 'equalto', 'dbt_change_type')\n | rejectattr('name', 'equalto', 'DBT_CHANGE_TYPE')\n | rejectattr('name', 'equalto', 'dbt_unique_key')\n | rejectattr('name', 'equalto', 'DBT_UNIQUE_KEY')\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 {% 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 %}", "resource_type": "macro", "tags": [], "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.build_snapshot_staging_table", "macro.dbt.create_columns", "macro.dbt.snapshot_merge_sql", "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}, "patch_path": null, "arguments": [], "created_at": 1666728757.328597, "supported_languages": ["sql"]}, "macro.dbt.materialization_test_default": {"unique_id": "macro.dbt.materialization_test_default", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/tests/test.sql", "original_file_path": "macros/materializations/tests/test.sql", "name": "materialization_test_default", "macro_sql": "{%- materialization test, default -%}\n\n {% set relations = [] %}\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 {% set target_relation = api.Relation.create(\n identifier=identifier, schema=schema, database=database, type='table') -%} %}\n\n {% if old_relation %}\n {% do adapter.drop_relation(old_relation) %}\n {% endif %}\n\n {% call statement(auto_begin=True) %}\n {{ create_table_as(False, target_relation, sql) }}\n {% endcall %}\n\n {% do relations.append(target_relation) %}\n\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 %}\n\n {% endif %}\n\n {% set limit = config.get('limit') %}\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 {{ get_test_sql(main_sql, fail_calc, warn_if, error_if, limit)}}\n\n {%- endcall %}\n\n {{ return({'relations': relations}) }}\n\n{%- endmaterialization -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.should_store_failures", "macro.dbt.statement", "macro.dbt.create_table_as", "macro.dbt.get_test_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.3305972, "supported_languages": ["sql"]}, "macro.dbt.get_test_sql": {"unique_id": "macro.dbt.get_test_sql", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/tests/helpers.sql", "original_file_path": "macros/materializations/tests/helpers.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__get_test_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.331091, "supported_languages": null}, "macro.dbt.default__get_test_sql": {"unique_id": "macro.dbt.default__get_test_sql", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/tests/helpers.sql", "original_file_path": "macros/materializations/tests/helpers.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.331363, "supported_languages": null}, "macro.dbt.get_where_subquery": {"unique_id": "macro.dbt.get_where_subquery", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/tests/where_subquery.sql", "original_file_path": "macros/materializations/tests/where_subquery.sql", "name": "get_where_subquery", "macro_sql": "{% macro get_where_subquery(relation) -%}\n {% do return(adapter.dispatch('get_where_subquery', 'dbt')(relation)) %}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__get_where_subquery"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.331757, "supported_languages": null}, "macro.dbt.default__get_where_subquery": {"unique_id": "macro.dbt.default__get_where_subquery", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/tests/where_subquery.sql", "original_file_path": "macros/materializations/tests/where_subquery.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.332093, "supported_languages": null}, "macro.dbt.get_quoted_csv": {"unique_id": "macro.dbt.get_quoted_csv", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/column_helpers.sql", "original_file_path": "macros/materializations/models/incremental/column_helpers.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.333629, "supported_languages": null}, "macro.dbt.diff_columns": {"unique_id": "macro.dbt.diff_columns", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/column_helpers.sql", "original_file_path": "macros/materializations/models/incremental/column_helpers.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.334193, "supported_languages": null}, "macro.dbt.diff_column_data_types": {"unique_id": "macro.dbt.diff_column_data_types", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/column_helpers.sql", "original_file_path": "macros/materializations/models/incremental/column_helpers.sql", "name": "diff_column_data_types", "macro_sql": "{% macro diff_column_data_types(source_columns, target_columns) %}\n\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.data_type != tc.data_type and not sc.can_expand_to(other_column=tc) %}\n {{ result.append( { 'column_name': tc.name, 'new_type': sc.data_type } ) }}\n {% endif %}\n {% endif %}\n {% endfor %}\n\n {{ return(result) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.334808, "supported_languages": null}, "macro.dbt.get_merge_update_columns": {"unique_id": "macro.dbt.get_merge_update_columns", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/column_helpers.sql", "original_file_path": "macros/materializations/models/incremental/column_helpers.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__get_merge_update_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.335022, "supported_languages": null}, "macro.dbt.default__get_merge_update_columns": {"unique_id": "macro.dbt.default__get_merge_update_columns", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/column_helpers.sql", "original_file_path": "macros/materializations/models/incremental/column_helpers.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.3356721, "supported_languages": null}, "macro.dbt.get_merge_sql": {"unique_id": "macro.dbt.get_merge_sql", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/merge.sql", "original_file_path": "macros/materializations/models/incremental/merge.sql", "name": "get_merge_sql", "macro_sql": "{% macro get_merge_sql(target, source, unique_key, dest_columns, predicates=none) -%}\n {{ adapter.dispatch('get_merge_sql', 'dbt')(target, source, unique_key, dest_columns, predicates) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__get_merge_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.339523, "supported_languages": null}, "macro.dbt.default__get_merge_sql": {"unique_id": "macro.dbt.default__get_merge_sql", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/merge.sql", "original_file_path": "macros/materializations/models/incremental/merge.sql", "name": "default__get_merge_sql", "macro_sql": "{% macro default__get_merge_sql(target, source, unique_key, dest_columns, predicates) -%}\n {%- set predicates = [] if predicates is none else [] + 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 unique_key_match %}\n DBT_INTERNAL_SOURCE.{{ unique_key }} = DBT_INTERNAL_DEST.{{ unique_key }}\n {% endset %}\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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.get_quoted_csv", "macro.dbt.get_merge_update_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.3409998, "supported_languages": null}, "macro.dbt.get_delete_insert_merge_sql": {"unique_id": "macro.dbt.get_delete_insert_merge_sql", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/merge.sql", "original_file_path": "macros/materializations/models/incremental/merge.sql", "name": "get_delete_insert_merge_sql", "macro_sql": "{% macro get_delete_insert_merge_sql(target, source, unique_key, dest_columns) -%}\n {{ adapter.dispatch('get_delete_insert_merge_sql', 'dbt')(target, source, unique_key, dest_columns) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__get_delete_insert_merge_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.341214, "supported_languages": null}, "macro.dbt.default__get_delete_insert_merge_sql": {"unique_id": "macro.dbt.default__get_delete_insert_merge_sql", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/merge.sql", "original_file_path": "macros/materializations/models/incremental/merge.sql", "name": "default__get_delete_insert_merge_sql", "macro_sql": "{% macro default__get_delete_insert_merge_sql(target, source, unique_key, dest_columns) -%}\n\n {%- set dest_cols_csv = get_quoted_csv(dest_columns | map(attribute=\"name\")) -%}\n\n {% if unique_key %}\n {% if unique_key is sequence and unique_key is not string %}\n delete from {{target }}\n using {{ source }}\n where (\n {% for key in unique_key %}\n {{ source }}.{{ key }} = {{ target }}.{{ key }}\n {{ \"and \" if not loop.last }}\n {% endfor %}\n );\n {% else %}\n delete from {{ target }}\n where (\n {{ unique_key }}) in (\n select ({{ unique_key }})\n from {{ source }}\n );\n\n {% endif %}\n {% endif %}\n\n insert into {{ target }} ({{ dest_cols_csv }})\n (\n select {{ dest_cols_csv }}\n from {{ source }}\n )\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.get_quoted_csv"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.341869, "supported_languages": null}, "macro.dbt.get_insert_overwrite_merge_sql": {"unique_id": "macro.dbt.get_insert_overwrite_merge_sql", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/merge.sql", "original_file_path": "macros/materializations/models/incremental/merge.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__get_insert_overwrite_merge_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.342106, "supported_languages": null}, "macro.dbt.default__get_insert_overwrite_merge_sql": {"unique_id": "macro.dbt.default__get_insert_overwrite_merge_sql", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/merge.sql", "original_file_path": "macros/materializations/models/incremental/merge.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.get_quoted_csv"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.342678, "supported_languages": null}, "macro.dbt.is_incremental": {"unique_id": "macro.dbt.is_incremental", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/is_incremental.sql", "original_file_path": "macros/materializations/models/incremental/is_incremental.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.should_full_refresh"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.343325, "supported_languages": null}, "macro.dbt.get_incremental_append_sql": {"unique_id": "macro.dbt.get_incremental_append_sql", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/strategies.sql", "original_file_path": "macros/materializations/models/incremental/strategies.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__get_incremental_append_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.3441541, "supported_languages": null}, "macro.dbt.default__get_incremental_append_sql": {"unique_id": "macro.dbt.default__get_incremental_append_sql", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/strategies.sql", "original_file_path": "macros/materializations/models/incremental/strategies.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.get_insert_into_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.344364, "supported_languages": null}, "macro.dbt.get_incremental_delete_insert_sql": {"unique_id": "macro.dbt.get_incremental_delete_insert_sql", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/strategies.sql", "original_file_path": "macros/materializations/models/incremental/strategies.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__get_incremental_delete_insert_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.344526, "supported_languages": null}, "macro.dbt.default__get_incremental_delete_insert_sql": {"unique_id": "macro.dbt.default__get_incremental_delete_insert_sql", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/strategies.sql", "original_file_path": "macros/materializations/models/incremental/strategies.sql", "name": "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\"])) %}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.get_delete_insert_merge_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.344762, "supported_languages": null}, "macro.dbt.get_incremental_merge_sql": {"unique_id": "macro.dbt.get_incremental_merge_sql", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/strategies.sql", "original_file_path": "macros/materializations/models/incremental/strategies.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__get_incremental_merge_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.344927, "supported_languages": null}, "macro.dbt.default__get_incremental_merge_sql": {"unique_id": "macro.dbt.default__get_incremental_merge_sql", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/strategies.sql", "original_file_path": "macros/materializations/models/incremental/strategies.sql", "name": "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\"])) %}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.get_merge_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.3451588, "supported_languages": null}, "macro.dbt.get_incremental_insert_overwrite_sql": {"unique_id": "macro.dbt.get_incremental_insert_overwrite_sql", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/strategies.sql", "original_file_path": "macros/materializations/models/incremental/strategies.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__get_incremental_insert_overwrite_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.345323, "supported_languages": null}, "macro.dbt.default__get_incremental_insert_overwrite_sql": {"unique_id": "macro.dbt.default__get_incremental_insert_overwrite_sql", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/strategies.sql", "original_file_path": "macros/materializations/models/incremental/strategies.sql", "name": "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[\"predicates\"])) %}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.get_insert_overwrite_merge_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.34557, "supported_languages": null}, "macro.dbt.get_incremental_default_sql": {"unique_id": "macro.dbt.get_incremental_default_sql", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/strategies.sql", "original_file_path": "macros/materializations/models/incremental/strategies.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__get_incremental_default_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.345738, "supported_languages": null}, "macro.dbt.default__get_incremental_default_sql": {"unique_id": "macro.dbt.default__get_incremental_default_sql", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/strategies.sql", "original_file_path": "macros/materializations/models/incremental/strategies.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.get_incremental_append_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.345872, "supported_languages": null}, "macro.dbt.get_insert_into_sql": {"unique_id": "macro.dbt.get_insert_into_sql", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/strategies.sql", "original_file_path": "macros/materializations/models/incremental/strategies.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.get_quoted_csv"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.3461308, "supported_languages": null}, "macro.dbt.materialization_incremental_default": {"unique_id": "macro.dbt.materialization_incremental_default", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/incremental.sql", "original_file_path": "macros/materializations/models/incremental/incremental.sql", "name": "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 {% if existing_relation is none %}\n {% set build_sql = get_create_table_as_sql(False, target_relation, sql) %}\n {% elif full_refresh_mode %}\n {% set build_sql = get_create_table_as_sql(False, intermediate_relation, sql) %}\n {% set need_swap = true %}\n {% else %}\n {% do run_query(get_create_table_as_sql(True, temp_relation, sql)) %}\n {% do adapter.expand_target_column_types(\n from_relation=temp_relation,\n to_relation=target_relation) %}\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_strategy = config.get('incremental_strategy') or 'default' %}\n {% set incremental_predicates = config.get('incremental_predicates', none) %}\n {% set strategy_sql_macro_func = adapter.get_incremental_strategy_macro(context, incremental_strategy) %}\n {% set strategy_arg_dict = ({'target_relation': target_relation, 'temp_relation': temp_relation, 'unique_key': unique_key, 'dest_columns': dest_columns, '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 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 {% if existing_relation is none or existing_relation.is_view or should_full_refresh() %}\n {% do create_indexes(target_relation) %}\n {% endif %}\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 %}", "resource_type": "macro", "tags": [], "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.should_revoke", "macro.dbt.apply_grants", "macro.dbt.persist_docs", "macro.dbt.create_indexes"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.3505669, "supported_languages": ["sql"]}, "macro.dbt.incremental_validate_on_schema_change": {"unique_id": "macro.dbt.incremental_validate_on_schema_change", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/on_schema_change.sql", "original_file_path": "macros/materializations/models/incremental/on_schema_change.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.355215, "supported_languages": null}, "macro.dbt.check_for_schema_changes": {"unique_id": "macro.dbt.check_for_schema_changes", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/on_schema_change.sql", "original_file_path": "macros/materializations/models/incremental/on_schema_change.sql", "name": "check_for_schema_changes", "macro_sql": "{% macro 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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.diff_columns", "macro.dbt.diff_column_data_types"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.356299, "supported_languages": null}, "macro.dbt.sync_column_schemas": {"unique_id": "macro.dbt.sync_column_schemas", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/on_schema_change.sql", "original_file_path": "macros/materializations/models/incremental/on_schema_change.sql", "name": "sync_column_schemas", "macro_sql": "{% macro 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\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 {%- 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 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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.alter_relation_add_remove_columns", "macro.dbt.alter_column_type"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.357395, "supported_languages": null}, "macro.dbt.process_schema_changes": {"unique_id": "macro.dbt.process_schema_changes", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/on_schema_change.sql", "original_file_path": "macros/materializations/models/incremental/on_schema_change.sql", "name": "process_schema_changes", "macro_sql": "{% macro 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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.check_for_schema_changes", "macro.dbt.sync_column_schemas"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.358155, "supported_languages": null}, "macro.dbt.materialization_table_default": {"unique_id": "macro.dbt.materialization_table_default", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/models/table/table.sql", "original_file_path": "macros/materializations/models/table/table.sql", "name": "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 -- cleanup\n {% if existing_relation is not none %}\n {{ adapter.rename_relation(existing_relation, backup_relation) }}\n {% endif %}\n\n {{ adapter.rename_relation(intermediate_relation, target_relation) }}\n\n {% do create_indexes(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 %}", "resource_type": "macro", "tags": [], "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}, "patch_path": null, "arguments": [], "created_at": 1666728757.360539, "supported_languages": ["sql"]}, "macro.dbt.get_create_table_as_sql": {"unique_id": "macro.dbt.get_create_table_as_sql", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/models/table/create_table_as.sql", "original_file_path": "macros/materializations/models/table/create_table_as.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__get_create_table_as_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.361058, "supported_languages": null}, "macro.dbt.default__get_create_table_as_sql": {"unique_id": "macro.dbt.default__get_create_table_as_sql", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/models/table/create_table_as.sql", "original_file_path": "macros/materializations/models/table/create_table_as.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.create_table_as"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.361226, "supported_languages": null}, "macro.dbt.create_table_as": {"unique_id": "macro.dbt.create_table_as", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/models/table/create_table_as.sql", "original_file_path": "macros/materializations/models/table/create_table_as.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_bigquery.bigquery__create_table_as"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.3616042, "supported_languages": null}, "macro.dbt.default__create_table_as": {"unique_id": "macro.dbt.default__create_table_as", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/models/table/create_table_as.sql", "original_file_path": "macros/materializations/models/table/create_table_as.sql", "name": "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 as (\n {{ sql }}\n );\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.36197, "supported_languages": null}, "macro.dbt.materialization_view_default": {"unique_id": "macro.dbt.materialization_view_default", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/models/view/view.sql", "original_file_path": "macros/materializations/models/view/view.sql", "name": "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 {{ adapter.rename_relation(existing_relation, backup_relation) }}\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 -%}", "resource_type": "macro", "tags": [], "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}, "patch_path": null, "arguments": [], "created_at": 1666728757.364301, "supported_languages": ["sql"]}, "macro.dbt.handle_existing_table": {"unique_id": "macro.dbt.handle_existing_table", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/models/view/helpers.sql", "original_file_path": "macros/materializations/models/view/helpers.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_bigquery.bigquery__handle_existing_table"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.3646238, "supported_languages": null}, "macro.dbt.default__handle_existing_table": {"unique_id": "macro.dbt.default__handle_existing_table", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/models/view/helpers.sql", "original_file_path": "macros/materializations/models/view/helpers.sql", "name": "default__handle_existing_table", "macro_sql": "{% macro default__handle_existing_table(full_refresh, old_relation) %}\n {{ log(\"Dropping relation \" ~ old_relation ~ \" because it is of type \" ~ old_relation.type) }}\n {{ adapter.drop_relation(old_relation) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.364823, "supported_languages": null}, "macro.dbt.create_or_replace_view": {"unique_id": "macro.dbt.create_or_replace_view", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/models/view/create_or_replace_view.sql", "original_file_path": "macros/materializations/models/view/create_or_replace_view.sql", "name": "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=True) %}\n\n {{ run_hooks(post_hooks) }}\n\n {{ return({'relations': [target_relation]}) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "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}, "patch_path": null, "arguments": [], "created_at": 1666728757.3662348, "supported_languages": null}, "macro.dbt.get_create_view_as_sql": {"unique_id": "macro.dbt.get_create_view_as_sql", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/models/view/create_view_as.sql", "original_file_path": "macros/materializations/models/view/create_view_as.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__get_create_view_as_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.366606, "supported_languages": null}, "macro.dbt.default__get_create_view_as_sql": {"unique_id": "macro.dbt.default__get_create_view_as_sql", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/models/view/create_view_as.sql", "original_file_path": "macros/materializations/models/view/create_view_as.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.create_view_as"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.366747, "supported_languages": null}, "macro.dbt.create_view_as": {"unique_id": "macro.dbt.create_view_as", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/models/view/create_view_as.sql", "original_file_path": "macros/materializations/models/view/create_view_as.sql", "name": "create_view_as", "macro_sql": "{% macro create_view_as(relation, sql) -%}\n {{ adapter.dispatch('create_view_as', 'dbt')(relation, sql) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_bigquery.bigquery__create_view_as"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.366909, "supported_languages": null}, "macro.dbt.default__create_view_as": {"unique_id": "macro.dbt.default__create_view_as", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/models/view/create_view_as.sql", "original_file_path": "macros/materializations/models/view/create_view_as.sql", "name": "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 }} as (\n {{ sql }}\n );\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.367135, "supported_languages": null}, "macro.dbt.materialization_seed_default": {"unique_id": "macro.dbt.materialization_seed_default", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/seeds/seed.sql", "original_file_path": "macros/materializations/seeds/seed.sql", "name": "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 comparision 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)) }}\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 = load_csv_rows(model, agate_table) %}\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 %}", "resource_type": "macro", "tags": [], "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}, "patch_path": null, "arguments": [], "created_at": 1666728757.3700638, "supported_languages": ["sql"]}, "macro.dbt.create_csv_table": {"unique_id": "macro.dbt.create_csv_table", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "name": "create_csv_table", "macro_sql": "{% macro create_csv_table(model, agate_table) -%}\n {{ adapter.dispatch('create_csv_table', 'dbt')(model, agate_table) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_bigquery.bigquery__create_csv_table"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.374207, "supported_languages": null}, "macro.dbt.default__create_csv_table": {"unique_id": "macro.dbt.default__create_csv_table", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.375, "supported_languages": null}, "macro.dbt.reset_csv_table": {"unique_id": "macro.dbt.reset_csv_table", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_bigquery.bigquery__reset_csv_table"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.375211, "supported_languages": null}, "macro.dbt.default__reset_csv_table": {"unique_id": "macro.dbt.default__reset_csv_table", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "name": "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 %}\n {% endif %}\n\n {{ return(sql) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.create_csv_table"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.375627, "supported_languages": null}, "macro.dbt.get_csv_sql": {"unique_id": "macro.dbt.get_csv_sql", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__get_csv_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.375797, "supported_languages": null}, "macro.dbt.default__get_csv_sql": {"unique_id": "macro.dbt.default__get_csv_sql", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.375911, "supported_languages": null}, "macro.dbt.get_binding_char": {"unique_id": "macro.dbt.get_binding_char", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "name": "get_binding_char", "macro_sql": "{% macro get_binding_char() -%}\n {{ adapter.dispatch('get_binding_char', 'dbt')() }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__get_binding_char"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.376034, "supported_languages": null}, "macro.dbt.default__get_binding_char": {"unique_id": "macro.dbt.default__get_binding_char", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "name": "default__get_binding_char", "macro_sql": "{% macro default__get_binding_char() %}\n {{ return('%s') }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.3761349, "supported_languages": null}, "macro.dbt.get_batch_size": {"unique_id": "macro.dbt.get_batch_size", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "name": "get_batch_size", "macro_sql": "{% macro get_batch_size() -%}\n {{ return(adapter.dispatch('get_batch_size', 'dbt')()) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__get_batch_size"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.376277, "supported_languages": null}, "macro.dbt.default__get_batch_size": {"unique_id": "macro.dbt.default__get_batch_size", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "name": "default__get_batch_size", "macro_sql": "{% macro default__get_batch_size() %}\n {{ return(10000) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.37638, "supported_languages": null}, "macro.dbt.get_seed_column_quoted_csv": {"unique_id": "macro.dbt.get_seed_column_quoted_csv", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.3768032, "supported_languages": null}, "macro.dbt.load_csv_rows": {"unique_id": "macro.dbt.load_csv_rows", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "name": "load_csv_rows", "macro_sql": "{% macro load_csv_rows(model, agate_table) -%}\n {{ adapter.dispatch('load_csv_rows', 'dbt')(model, agate_table) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_bigquery.bigquery__load_csv_rows"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.37697, "supported_languages": null}, "macro.dbt.default__load_csv_rows": {"unique_id": "macro.dbt.default__load_csv_rows", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "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}, "patch_path": null, "arguments": [], "created_at": 1666728757.3780968, "supported_languages": null}, "macro.dbt.generate_alias_name": {"unique_id": "macro.dbt.generate_alias_name", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/get_custom_name/get_custom_alias.sql", "original_file_path": "macros/get_custom_name/get_custom_alias.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__generate_alias_name"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.378491, "supported_languages": null}, "macro.dbt.default__generate_alias_name": {"unique_id": "macro.dbt.default__generate_alias_name", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/get_custom_name/get_custom_alias.sql", "original_file_path": "macros/get_custom_name/get_custom_alias.sql", "name": "default__generate_alias_name", "macro_sql": "{% macro default__generate_alias_name(custom_alias_name=none, node=none) -%}\n\n {%- if custom_alias_name is none -%}\n\n {{ node.name }}\n\n {%- else -%}\n\n {{ custom_alias_name | trim }}\n\n {%- endif -%}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.3786938, "supported_languages": null}, "macro.dbt.generate_schema_name": {"unique_id": "macro.dbt.generate_schema_name", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/get_custom_name/get_custom_schema.sql", "original_file_path": "macros/get_custom_name/get_custom_schema.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__generate_schema_name"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.379213, "supported_languages": null}, "macro.dbt.default__generate_schema_name": {"unique_id": "macro.dbt.default__generate_schema_name", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/get_custom_name/get_custom_schema.sql", "original_file_path": "macros/get_custom_name/get_custom_schema.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.37945, "supported_languages": null}, "macro.dbt.generate_schema_name_for_env": {"unique_id": "macro.dbt.generate_schema_name_for_env", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/get_custom_name/get_custom_schema.sql", "original_file_path": "macros/get_custom_name/get_custom_schema.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.379704, "supported_languages": null}, "macro.dbt.generate_database_name": {"unique_id": "macro.dbt.generate_database_name", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/get_custom_name/get_custom_database.sql", "original_file_path": "macros/get_custom_name/get_custom_database.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__generate_database_name"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.3801038, "supported_languages": null}, "macro.dbt.default__generate_database_name": {"unique_id": "macro.dbt.default__generate_database_name", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/get_custom_name/get_custom_database.sql", "original_file_path": "macros/get_custom_name/get_custom_database.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.380325, "supported_languages": null}, "macro.dbt.default__test_relationships": {"unique_id": "macro.dbt.default__test_relationships", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/generic_test_sql/relationships.sql", "original_file_path": "macros/generic_test_sql/relationships.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.380694, "supported_languages": null}, "macro.dbt.default__test_not_null": {"unique_id": "macro.dbt.default__test_not_null", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/generic_test_sql/not_null.sql", "original_file_path": "macros/generic_test_sql/not_null.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.should_store_failures"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.381013, "supported_languages": null}, "macro.dbt.default__test_unique": {"unique_id": "macro.dbt.default__test_unique", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/generic_test_sql/unique.sql", "original_file_path": "macros/generic_test_sql/unique.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.381284, "supported_languages": null}, "macro.dbt.default__test_accepted_values": {"unique_id": "macro.dbt.default__test_accepted_values", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/generic_test_sql/accepted_values.sql", "original_file_path": "macros/generic_test_sql/accepted_values.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.381842, "supported_languages": null}, "macro.dbt.statement": {"unique_id": "macro.dbt.statement", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/etc/statement.sql", "original_file_path": "macros/etc/statement.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.383198, "supported_languages": null}, "macro.dbt.noop_statement": {"unique_id": "macro.dbt.noop_statement", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/etc/statement.sql", "original_file_path": "macros/etc/statement.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.383955, "supported_languages": null}, "macro.dbt.run_query": {"unique_id": "macro.dbt.run_query", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/etc/statement.sql", "original_file_path": "macros/etc/statement.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.384213, "supported_languages": null}, "macro.dbt.convert_datetime": {"unique_id": "macro.dbt.convert_datetime", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/etc/datetime.sql", "original_file_path": "macros/etc/datetime.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.3858151, "supported_languages": null}, "macro.dbt.dates_in_range": {"unique_id": "macro.dbt.dates_in_range", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/etc/datetime.sql", "original_file_path": "macros/etc/datetime.sql", "name": "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 Partiton 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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.convert_datetime"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.386862, "supported_languages": null}, "macro.dbt.partition_range": {"unique_id": "macro.dbt.partition_range", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/etc/datetime.sql", "original_file_path": "macros/etc/datetime.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.dates_in_range"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.387539, "supported_languages": null}, "macro.dbt.py_current_timestring": {"unique_id": "macro.dbt.py_current_timestring", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/etc/datetime.sql", "original_file_path": "macros/etc/datetime.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.387748, "supported_languages": null}, "macro.dbt.except": {"unique_id": "macro.dbt.except", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/utils/except.sql", "original_file_path": "macros/utils/except.sql", "name": "except", "macro_sql": "{% macro except() %}\n {{ return(adapter.dispatch('except', 'dbt')()) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_bigquery.bigquery__except"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.388026, "supported_languages": null}, "macro.dbt.default__except": {"unique_id": "macro.dbt.default__except", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/utils/except.sql", "original_file_path": "macros/utils/except.sql", "name": "default__except", "macro_sql": "{% macro default__except() %}\n\n except\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.388095, "supported_languages": null}, "macro.dbt.replace": {"unique_id": "macro.dbt.replace", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/utils/replace.sql", "original_file_path": "macros/utils/replace.sql", "name": "replace", "macro_sql": "{% macro replace(field, old_chars, new_chars) -%}\n {{ return(adapter.dispatch('replace', 'dbt') (field, old_chars, new_chars)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__replace"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.388438, "supported_languages": null}, "macro.dbt.default__replace": {"unique_id": "macro.dbt.default__replace", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/utils/replace.sql", "original_file_path": "macros/utils/replace.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.38858, "supported_languages": null}, "macro.dbt.concat": {"unique_id": "macro.dbt.concat", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/utils/concat.sql", "original_file_path": "macros/utils/concat.sql", "name": "concat", "macro_sql": "{% macro concat(fields) -%}\n {{ return(adapter.dispatch('concat', 'dbt')(fields)) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__concat"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.388852, "supported_languages": null}, "macro.dbt.default__concat": {"unique_id": "macro.dbt.default__concat", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/utils/concat.sql", "original_file_path": "macros/utils/concat.sql", "name": "default__concat", "macro_sql": "{% macro default__concat(fields) -%}\n {{ fields|join(' || ') }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.388972, "supported_languages": null}, "macro.dbt.length": {"unique_id": "macro.dbt.length", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/utils/length.sql", "original_file_path": "macros/utils/length.sql", "name": "length", "macro_sql": "{% macro length(expression) -%}\n {{ return(adapter.dispatch('length', 'dbt') (expression)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__length"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.389249, "supported_languages": null}, "macro.dbt.default__length": {"unique_id": "macro.dbt.default__length", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/utils/length.sql", "original_file_path": "macros/utils/length.sql", "name": "default__length", "macro_sql": "{% macro default__length(expression) %}\n\n length(\n {{ expression }}\n )\n\n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.3893461, "supported_languages": null}, "macro.dbt.dateadd": {"unique_id": "macro.dbt.dateadd", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/utils/dateadd.sql", "original_file_path": "macros/utils/dateadd.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_bigquery.bigquery__dateadd"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.3896918, "supported_languages": null}, "macro.dbt.default__dateadd": {"unique_id": "macro.dbt.default__dateadd", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/utils/dateadd.sql", "original_file_path": "macros/utils/dateadd.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.389837, "supported_languages": null}, "macro.dbt.intersect": {"unique_id": "macro.dbt.intersect", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/utils/intersect.sql", "original_file_path": "macros/utils/intersect.sql", "name": "intersect", "macro_sql": "{% macro intersect() %}\n {{ return(adapter.dispatch('intersect', 'dbt')()) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_bigquery.bigquery__intersect"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.390083, "supported_languages": null}, "macro.dbt.default__intersect": {"unique_id": "macro.dbt.default__intersect", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/utils/intersect.sql", "original_file_path": "macros/utils/intersect.sql", "name": "default__intersect", "macro_sql": "{% macro default__intersect() %}\n\n intersect\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.3901582, "supported_languages": null}, "macro.dbt.escape_single_quotes": {"unique_id": "macro.dbt.escape_single_quotes", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/utils/escape_single_quotes.sql", "original_file_path": "macros/utils/escape_single_quotes.sql", "name": "escape_single_quotes", "macro_sql": "{% macro escape_single_quotes(expression) %}\n {{ return(adapter.dispatch('escape_single_quotes', 'dbt') (expression)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_bigquery.bigquery__escape_single_quotes"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.3904471, "supported_languages": null}, "macro.dbt.default__escape_single_quotes": {"unique_id": "macro.dbt.default__escape_single_quotes", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/utils/escape_single_quotes.sql", "original_file_path": "macros/utils/escape_single_quotes.sql", "name": "default__escape_single_quotes", "macro_sql": "{% macro default__escape_single_quotes(expression) -%}\n{{ expression | replace(\"'\",\"''\") }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.3905761, "supported_languages": null}, "macro.dbt.right": {"unique_id": "macro.dbt.right", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/utils/right.sql", "original_file_path": "macros/utils/right.sql", "name": "right", "macro_sql": "{% macro right(string_text, length_expression) -%}\n {{ return(adapter.dispatch('right', 'dbt') (string_text, length_expression)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_bigquery.bigquery__right"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.390893, "supported_languages": null}, "macro.dbt.default__right": {"unique_id": "macro.dbt.default__right", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/utils/right.sql", "original_file_path": "macros/utils/right.sql", "name": "default__right", "macro_sql": "{% macro default__right(string_text, length_expression) %}\n\n right(\n {{ string_text }},\n {{ length_expression }}\n )\n\n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.3910751, "supported_languages": null}, "macro.dbt.listagg": {"unique_id": "macro.dbt.listagg", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/utils/listagg.sql", "original_file_path": "macros/utils/listagg.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_bigquery.bigquery__listagg"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.39168, "supported_languages": null}, "macro.dbt.default__listagg": {"unique_id": "macro.dbt.default__listagg", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/utils/listagg.sql", "original_file_path": "macros/utils/listagg.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.392041, "supported_languages": null}, "macro.dbt.datediff": {"unique_id": "macro.dbt.datediff", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/utils/datediff.sql", "original_file_path": "macros/utils/datediff.sql", "name": "datediff", "macro_sql": "{% macro datediff(first_date, second_date, datepart) %}\n {{ return(adapter.dispatch('datediff', 'dbt')(first_date, second_date, datepart)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_bigquery.bigquery__datediff"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.392386, "supported_languages": null}, "macro.dbt.default__datediff": {"unique_id": "macro.dbt.default__datediff", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/utils/datediff.sql", "original_file_path": "macros/utils/datediff.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.3925278, "supported_languages": null}, "macro.dbt.safe_cast": {"unique_id": "macro.dbt.safe_cast", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/utils/safe_cast.sql", "original_file_path": "macros/utils/safe_cast.sql", "name": "safe_cast", "macro_sql": "{% macro safe_cast(field, type) %}\n {{ return(adapter.dispatch('safe_cast', 'dbt') (field, type)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_bigquery.bigquery__safe_cast"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.39284, "supported_languages": null}, "macro.dbt.default__safe_cast": {"unique_id": "macro.dbt.default__safe_cast", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/utils/safe_cast.sql", "original_file_path": "macros/utils/safe_cast.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.3929658, "supported_languages": null}, "macro.dbt.hash": {"unique_id": "macro.dbt.hash", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/utils/hash.sql", "original_file_path": "macros/utils/hash.sql", "name": "hash", "macro_sql": "{% macro hash(field) -%}\n {{ return(adapter.dispatch('hash', 'dbt') (field)) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_bigquery.bigquery__hash"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.3932428, "supported_languages": null}, "macro.dbt.default__hash": {"unique_id": "macro.dbt.default__hash", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/utils/hash.sql", "original_file_path": "macros/utils/hash.sql", "name": "default__hash", "macro_sql": "{% macro default__hash(field) -%}\n md5(cast({{ field }} as {{ api.Column.translate_type('string') }}))\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.393388, "supported_languages": null}, "macro.dbt.cast_bool_to_text": {"unique_id": "macro.dbt.cast_bool_to_text", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/utils/cast_bool_to_text.sql", "original_file_path": "macros/utils/cast_bool_to_text.sql", "name": "cast_bool_to_text", "macro_sql": "{% macro cast_bool_to_text(field) %}\n {{ adapter.dispatch('cast_bool_to_text', 'dbt') (field) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__cast_bool_to_text"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.393657, "supported_languages": null}, "macro.dbt.default__cast_bool_to_text": {"unique_id": "macro.dbt.default__cast_bool_to_text", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/utils/cast_bool_to_text.sql", "original_file_path": "macros/utils/cast_bool_to_text.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.3937988, "supported_languages": null}, "macro.dbt.any_value": {"unique_id": "macro.dbt.any_value", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/utils/any_value.sql", "original_file_path": "macros/utils/any_value.sql", "name": "any_value", "macro_sql": "{% macro any_value(expression) -%}\n {{ return(adapter.dispatch('any_value', 'dbt') (expression)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__any_value"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.394067, "supported_languages": null}, "macro.dbt.default__any_value": {"unique_id": "macro.dbt.default__any_value", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/utils/any_value.sql", "original_file_path": "macros/utils/any_value.sql", "name": "default__any_value", "macro_sql": "{% macro default__any_value(expression) -%}\n\n any_value({{ expression }})\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.39416, "supported_languages": null}, "macro.dbt.position": {"unique_id": "macro.dbt.position", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/utils/position.sql", "original_file_path": "macros/utils/position.sql", "name": "position", "macro_sql": "{% macro position(substring_text, string_text) -%}\n {{ return(adapter.dispatch('position', 'dbt') (substring_text, string_text)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_bigquery.bigquery__position"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.394469, "supported_languages": null}, "macro.dbt.default__position": {"unique_id": "macro.dbt.default__position", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/utils/position.sql", "original_file_path": "macros/utils/position.sql", "name": "default__position", "macro_sql": "{% macro default__position(substring_text, string_text) %}\n\n position(\n {{ substring_text }} in {{ string_text }}\n )\n\n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.394588, "supported_languages": null}, "macro.dbt.string_literal": {"unique_id": "macro.dbt.string_literal", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/utils/literal.sql", "original_file_path": "macros/utils/literal.sql", "name": "string_literal", "macro_sql": "{%- macro string_literal(value) -%}\n {{ return(adapter.dispatch('string_literal', 'dbt') (value)) }}\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__string_literal"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.394866, "supported_languages": null}, "macro.dbt.default__string_literal": {"unique_id": "macro.dbt.default__string_literal", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/utils/literal.sql", "original_file_path": "macros/utils/literal.sql", "name": "default__string_literal", "macro_sql": "{% macro default__string_literal(value) -%}\n '{{ value }}'\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.394957, "supported_languages": null}, "macro.dbt.type_string": {"unique_id": "macro.dbt.type_string", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "name": "type_string", "macro_sql": "\n\n{%- macro type_string() -%}\n {{ return(adapter.dispatch('type_string', 'dbt')()) }}\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.3958359, "supported_languages": null}, "macro.dbt.default__type_string": {"unique_id": "macro.dbt.default__type_string", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "name": "default__type_string", "macro_sql": "{% macro default__type_string() %}\n {{ return(api.Column.translate_type(\"string\")) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.395971, "supported_languages": null}, "macro.dbt.type_timestamp": {"unique_id": "macro.dbt.type_timestamp", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "name": "type_timestamp", "macro_sql": "\n\n{%- macro type_timestamp() -%}\n {{ return(adapter.dispatch('type_timestamp', 'dbt')()) }}\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__type_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.396173, "supported_languages": null}, "macro.dbt.default__type_timestamp": {"unique_id": "macro.dbt.default__type_timestamp", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "name": "default__type_timestamp", "macro_sql": "{% macro default__type_timestamp() %}\n {{ return(api.Column.translate_type(\"timestamp\")) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.3963149, "supported_languages": null}, "macro.dbt.type_float": {"unique_id": "macro.dbt.type_float", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "name": "type_float", "macro_sql": "\n\n{%- macro type_float() -%}\n {{ return(adapter.dispatch('type_float', 'dbt')()) }}\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__type_float"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.396459, "supported_languages": null}, "macro.dbt.default__type_float": {"unique_id": "macro.dbt.default__type_float", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "name": "default__type_float", "macro_sql": "{% macro default__type_float() %}\n {{ return(api.Column.translate_type(\"float\")) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.3965929, "supported_languages": null}, "macro.dbt.type_numeric": {"unique_id": "macro.dbt.type_numeric", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "name": "type_numeric", "macro_sql": "\n\n{%- macro type_numeric() -%}\n {{ return(adapter.dispatch('type_numeric', 'dbt')()) }}\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__type_numeric"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.396739, "supported_languages": null}, "macro.dbt.default__type_numeric": {"unique_id": "macro.dbt.default__type_numeric", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "name": "default__type_numeric", "macro_sql": "{% macro default__type_numeric() %}\n {{ return(api.Column.numeric_type(\"numeric\", 28, 6)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.396896, "supported_languages": null}, "macro.dbt.type_bigint": {"unique_id": "macro.dbt.type_bigint", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "name": "type_bigint", "macro_sql": "\n\n{%- macro type_bigint() -%}\n {{ return(adapter.dispatch('type_bigint', 'dbt')()) }}\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__type_bigint"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.397042, "supported_languages": null}, "macro.dbt.default__type_bigint": {"unique_id": "macro.dbt.default__type_bigint", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "name": "default__type_bigint", "macro_sql": "{% macro default__type_bigint() %}\n {{ return(api.Column.translate_type(\"bigint\")) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.397177, "supported_languages": null}, "macro.dbt.type_int": {"unique_id": "macro.dbt.type_int", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "name": "type_int", "macro_sql": "\n\n{%- macro type_int() -%}\n {{ return(adapter.dispatch('type_int', 'dbt')()) }}\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__type_int"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.3973172, "supported_languages": null}, "macro.dbt.default__type_int": {"unique_id": "macro.dbt.default__type_int", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "name": "default__type_int", "macro_sql": "{%- macro default__type_int() -%}\n {{ return(api.Column.translate_type(\"integer\")) }}\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.397446, "supported_languages": null}, "macro.dbt.type_boolean": {"unique_id": "macro.dbt.type_boolean", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "name": "type_boolean", "macro_sql": "\n\n{%- macro type_boolean() -%}\n {{ return(adapter.dispatch('type_boolean', 'dbt')()) }}\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__type_boolean"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.397588, "supported_languages": null}, "macro.dbt.default__type_boolean": {"unique_id": "macro.dbt.default__type_boolean", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "name": "default__type_boolean", "macro_sql": "{%- macro default__type_boolean() -%}\n {{ return(api.Column.translate_type(\"boolean\")) }}\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.397716, "supported_languages": null}, "macro.dbt.array_concat": {"unique_id": "macro.dbt.array_concat", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/utils/array_concat.sql", "original_file_path": "macros/utils/array_concat.sql", "name": "array_concat", "macro_sql": "{% macro array_concat(array_1, array_2) -%}\n {{ return(adapter.dispatch('array_concat', 'dbt')(array_1, array_2)) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_bigquery.bigquery__array_concat"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.398014, "supported_languages": null}, "macro.dbt.default__array_concat": {"unique_id": "macro.dbt.default__array_concat", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/utils/array_concat.sql", "original_file_path": "macros/utils/array_concat.sql", "name": "default__array_concat", "macro_sql": "{% macro default__array_concat(array_1, array_2) -%}\n array_cat({{ array_1 }}, {{ array_2 }})\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.398127, "supported_languages": null}, "macro.dbt.bool_or": {"unique_id": "macro.dbt.bool_or", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/utils/bool_or.sql", "original_file_path": "macros/utils/bool_or.sql", "name": "bool_or", "macro_sql": "{% macro bool_or(expression) -%}\n {{ return(adapter.dispatch('bool_or', 'dbt') (expression)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_bigquery.bigquery__bool_or"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.3983948, "supported_languages": null}, "macro.dbt.default__bool_or": {"unique_id": "macro.dbt.default__bool_or", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/utils/bool_or.sql", "original_file_path": "macros/utils/bool_or.sql", "name": "default__bool_or", "macro_sql": "{% macro default__bool_or(expression) -%}\n\n bool_or({{ expression }})\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.398489, "supported_languages": null}, "macro.dbt.last_day": {"unique_id": "macro.dbt.last_day", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/utils/last_day.sql", "original_file_path": "macros/utils/last_day.sql", "name": "last_day", "macro_sql": "{% macro last_day(date, datepart) %}\n {{ return(adapter.dispatch('last_day', 'dbt') (date, datepart)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__last_day"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.39884, "supported_languages": null}, "macro.dbt.default_last_day": {"unique_id": "macro.dbt.default_last_day", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/utils/last_day.sql", "original_file_path": "macros/utils/last_day.sql", "name": "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", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.dateadd", "macro.dbt.date_trunc"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.399074, "supported_languages": null}, "macro.dbt.default__last_day": {"unique_id": "macro.dbt.default__last_day", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/utils/last_day.sql", "original_file_path": "macros/utils/last_day.sql", "name": "default__last_day", "macro_sql": "{% macro default__last_day(date, datepart) -%}\n {{dbt.default_last_day(date, datepart)}}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default_last_day"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.3992052, "supported_languages": null}, "macro.dbt.split_part": {"unique_id": "macro.dbt.split_part", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/utils/split_part.sql", "original_file_path": "macros/utils/split_part.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_bigquery.bigquery__split_part"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.399704, "supported_languages": null}, "macro.dbt.default__split_part": {"unique_id": "macro.dbt.default__split_part", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/utils/split_part.sql", "original_file_path": "macros/utils/split_part.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.399915, "supported_languages": null}, "macro.dbt._split_part_negative": {"unique_id": "macro.dbt._split_part_negative", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/utils/split_part.sql", "original_file_path": "macros/utils/split_part.sql", "name": "_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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.400107, "supported_languages": null}, "macro.dbt.date_trunc": {"unique_id": "macro.dbt.date_trunc", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/utils/date_trunc.sql", "original_file_path": "macros/utils/date_trunc.sql", "name": "date_trunc", "macro_sql": "{% macro date_trunc(datepart, date) -%}\n {{ return(adapter.dispatch('date_trunc', 'dbt') (datepart, date)) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_bigquery.bigquery__date_trunc"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.400398, "supported_languages": null}, "macro.dbt.default__date_trunc": {"unique_id": "macro.dbt.default__date_trunc", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/utils/date_trunc.sql", "original_file_path": "macros/utils/date_trunc.sql", "name": "default__date_trunc", "macro_sql": "{% macro default__date_trunc(datepart, date) -%}\n date_trunc('{{datepart}}', {{date}})\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.400511, "supported_languages": null}, "macro.dbt.array_construct": {"unique_id": "macro.dbt.array_construct", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/utils/array_construct.sql", "original_file_path": "macros/utils/array_construct.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_bigquery.bigquery__array_construct"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.400892, "supported_languages": null}, "macro.dbt.default__array_construct": {"unique_id": "macro.dbt.default__array_construct", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/utils/array_construct.sql", "original_file_path": "macros/utils/array_construct.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.401108, "supported_languages": null}, "macro.dbt.array_append": {"unique_id": "macro.dbt.array_append", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/utils/array_append.sql", "original_file_path": "macros/utils/array_append.sql", "name": "array_append", "macro_sql": "{% macro array_append(array, new_element) -%}\n {{ return(adapter.dispatch('array_append', 'dbt')(array, new_element)) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_bigquery.bigquery__array_append"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.401407, "supported_languages": null}, "macro.dbt.default__array_append": {"unique_id": "macro.dbt.default__array_append", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/utils/array_append.sql", "original_file_path": "macros/utils/array_append.sql", "name": "default__array_append", "macro_sql": "{% macro default__array_append(array, new_element) -%}\n array_append({{ array }}, {{ new_element }})\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.4015229, "supported_languages": null}, "macro.dbt.create_schema": {"unique_id": "macro.dbt.create_schema", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/schema.sql", "original_file_path": "macros/adapters/schema.sql", "name": "create_schema", "macro_sql": "{% macro create_schema(relation) -%}\n {{ adapter.dispatch('create_schema', 'dbt')(relation) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__create_schema"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.401898, "supported_languages": null}, "macro.dbt.default__create_schema": {"unique_id": "macro.dbt.default__create_schema", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/schema.sql", "original_file_path": "macros/adapters/schema.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.402058, "supported_languages": null}, "macro.dbt.drop_schema": {"unique_id": "macro.dbt.drop_schema", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/schema.sql", "original_file_path": "macros/adapters/schema.sql", "name": "drop_schema", "macro_sql": "{% macro drop_schema(relation) -%}\n {{ adapter.dispatch('drop_schema', 'dbt')(relation) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_bigquery.bigquery__drop_schema"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.4022021, "supported_languages": null}, "macro.dbt.default__drop_schema": {"unique_id": "macro.dbt.default__drop_schema", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/schema.sql", "original_file_path": "macros/adapters/schema.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.4023628, "supported_languages": null}, "macro.dbt.current_timestamp": {"unique_id": "macro.dbt.current_timestamp", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/timestamps.sql", "original_file_path": "macros/adapters/timestamps.sql", "name": "current_timestamp", "macro_sql": "{%- macro current_timestamp() -%}\n {{ adapter.dispatch('current_timestamp', 'dbt')() }}\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_bigquery.bigquery__current_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.4028668, "supported_languages": null}, "macro.dbt.default__current_timestamp": {"unique_id": "macro.dbt.default__current_timestamp", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/timestamps.sql", "original_file_path": "macros/adapters/timestamps.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.403002, "supported_languages": null}, "macro.dbt.snapshot_get_time": {"unique_id": "macro.dbt.snapshot_get_time", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/timestamps.sql", "original_file_path": "macros/adapters/timestamps.sql", "name": "snapshot_get_time", "macro_sql": "\n\n{%- macro snapshot_get_time() -%}\n {{ adapter.dispatch('snapshot_get_time', 'dbt')() }}\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__snapshot_get_time"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.4031308, "supported_languages": null}, "macro.dbt.default__snapshot_get_time": {"unique_id": "macro.dbt.default__snapshot_get_time", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/timestamps.sql", "original_file_path": "macros/adapters/timestamps.sql", "name": "default__snapshot_get_time", "macro_sql": "{% macro default__snapshot_get_time() %}\n {{ current_timestamp() }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.current_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.4032269, "supported_languages": null}, "macro.dbt.current_timestamp_backcompat": {"unique_id": "macro.dbt.current_timestamp_backcompat", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/timestamps.sql", "original_file_path": "macros/adapters/timestamps.sql", "name": "current_timestamp_backcompat", "macro_sql": "{% macro current_timestamp_backcompat() %}\n {{ return(adapter.dispatch('current_timestamp_backcompat', 'dbt')()) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_bigquery.bigquery__current_timestamp_backcompat"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.403382, "supported_languages": null}, "macro.dbt.default__current_timestamp_backcompat": {"unique_id": "macro.dbt.default__current_timestamp_backcompat", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/timestamps.sql", "original_file_path": "macros/adapters/timestamps.sql", "name": "default__current_timestamp_backcompat", "macro_sql": "{% macro default__current_timestamp_backcompat() %}\n current_timestamp::timestamp\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.403452, "supported_languages": null}, "macro.dbt.current_timestamp_in_utc_backcompat": {"unique_id": "macro.dbt.current_timestamp_in_utc_backcompat", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/timestamps.sql", "original_file_path": "macros/adapters/timestamps.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__current_timestamp_in_utc_backcompat"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.403598, "supported_languages": null}, "macro.dbt.default__current_timestamp_in_utc_backcompat": {"unique_id": "macro.dbt.default__current_timestamp_in_utc_backcompat", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/timestamps.sql", "original_file_path": "macros/adapters/timestamps.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.current_timestamp_backcompat", "macro.dbt_bigquery.bigquery__current_timestamp_backcompat"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.403741, "supported_languages": null}, "macro.dbt.get_create_index_sql": {"unique_id": "macro.dbt.get_create_index_sql", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/indexes.sql", "original_file_path": "macros/adapters/indexes.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__get_create_index_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.4042659, "supported_languages": null}, "macro.dbt.default__get_create_index_sql": {"unique_id": "macro.dbt.default__get_create_index_sql", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/indexes.sql", "original_file_path": "macros/adapters/indexes.sql", "name": "default__get_create_index_sql", "macro_sql": "{% macro default__get_create_index_sql(relation, index_dict) -%}\n {% do return(None) %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.4043891, "supported_languages": null}, "macro.dbt.create_indexes": {"unique_id": "macro.dbt.create_indexes", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/indexes.sql", "original_file_path": "macros/adapters/indexes.sql", "name": "create_indexes", "macro_sql": "{% macro create_indexes(relation) -%}\n {{ adapter.dispatch('create_indexes', 'dbt')(relation) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__create_indexes"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.4045272, "supported_languages": null}, "macro.dbt.default__create_indexes": {"unique_id": "macro.dbt.default__create_indexes", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/indexes.sql", "original_file_path": "macros/adapters/indexes.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.get_create_index_sql", "macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.404882, "supported_languages": null}, "macro.dbt.make_intermediate_relation": {"unique_id": "macro.dbt.make_intermediate_relation", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__make_intermediate_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.407733, "supported_languages": null}, "macro.dbt.default__make_intermediate_relation": {"unique_id": "macro.dbt.default__make_intermediate_relation", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__make_temp_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.4078798, "supported_languages": null}, "macro.dbt.make_temp_relation": {"unique_id": "macro.dbt.make_temp_relation", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "name": "make_temp_relation", "macro_sql": "{% macro make_temp_relation(base_relation, suffix='__dbt_tmp') %}\n {{ return(adapter.dispatch('make_temp_relation', 'dbt')(base_relation, suffix)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__make_temp_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.4080708, "supported_languages": null}, "macro.dbt.default__make_temp_relation": {"unique_id": "macro.dbt.default__make_temp_relation", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.408336, "supported_languages": null}, "macro.dbt.make_backup_relation": {"unique_id": "macro.dbt.make_backup_relation", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__make_backup_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.408561, "supported_languages": null}, "macro.dbt.default__make_backup_relation": {"unique_id": "macro.dbt.default__make_backup_relation", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.408861, "supported_languages": null}, "macro.dbt.drop_relation": {"unique_id": "macro.dbt.drop_relation", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "name": "drop_relation", "macro_sql": "{% macro drop_relation(relation) -%}\n {{ return(adapter.dispatch('drop_relation', 'dbt')(relation)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_bigquery.bigquery__drop_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.409023, "supported_languages": null}, "macro.dbt.default__drop_relation": {"unique_id": "macro.dbt.default__drop_relation", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "name": "default__drop_relation", "macro_sql": "{% macro default__drop_relation(relation) -%}\n {% call statement('drop_relation', auto_begin=False) -%}\n drop {{ relation.type }} if exists {{ relation }} cascade\n {%- endcall %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.4092128, "supported_languages": null}, "macro.dbt.truncate_relation": {"unique_id": "macro.dbt.truncate_relation", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "name": "truncate_relation", "macro_sql": "{% macro truncate_relation(relation) -%}\n {{ return(adapter.dispatch('truncate_relation', 'dbt')(relation)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__truncate_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.409374, "supported_languages": null}, "macro.dbt.default__truncate_relation": {"unique_id": "macro.dbt.default__truncate_relation", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "name": "default__truncate_relation", "macro_sql": "{% macro default__truncate_relation(relation) -%}\n {% call statement('truncate_relation') -%}\n truncate table {{ relation }}\n {%- endcall %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.409518, "supported_languages": null}, "macro.dbt.rename_relation": {"unique_id": "macro.dbt.rename_relation", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "name": "rename_relation", "macro_sql": "{% macro rename_relation(from_relation, to_relation) -%}\n {{ return(adapter.dispatch('rename_relation', 'dbt')(from_relation, to_relation)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_bigquery.bigquery__rename_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.409698, "supported_languages": null}, "macro.dbt.default__rename_relation": {"unique_id": "macro.dbt.default__rename_relation", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "name": "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 }} rename to {{ target_name }}\n {%- endcall %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.409942, "supported_languages": null}, "macro.dbt.get_or_create_relation": {"unique_id": "macro.dbt.get_or_create_relation", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__get_or_create_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.410163, "supported_languages": null}, "macro.dbt.default__get_or_create_relation": {"unique_id": "macro.dbt.default__get_or_create_relation", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.4107149, "supported_languages": null}, "macro.dbt.load_cached_relation": {"unique_id": "macro.dbt.load_cached_relation", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.410918, "supported_languages": null}, "macro.dbt.load_relation": {"unique_id": "macro.dbt.load_relation", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "name": "load_relation", "macro_sql": "{% macro load_relation(relation) %}\n {{ return(load_cached_relation(relation)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.load_cached_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.4110432, "supported_languages": null}, "macro.dbt.drop_relation_if_exists": {"unique_id": "macro.dbt.drop_relation_if_exists", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.411211, "supported_languages": null}, "macro.dbt.collect_freshness": {"unique_id": "macro.dbt.collect_freshness", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/freshness.sql", "original_file_path": "macros/adapters/freshness.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__collect_freshness"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.411645, "supported_languages": null}, "macro.dbt.default__collect_freshness": {"unique_id": "macro.dbt.default__collect_freshness", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/freshness.sql", "original_file_path": "macros/adapters/freshness.sql", "name": "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').table) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement", "macro.dbt.current_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.41201, "supported_languages": null}, "macro.dbt.copy_grants": {"unique_id": "macro.dbt.copy_grants", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "name": "copy_grants", "macro_sql": "{% macro copy_grants() %}\n {{ return(adapter.dispatch('copy_grants', 'dbt')()) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__copy_grants"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.413606, "supported_languages": null}, "macro.dbt.default__copy_grants": {"unique_id": "macro.dbt.default__copy_grants", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "name": "default__copy_grants", "macro_sql": "{% macro default__copy_grants() %}\n {{ return(True) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.4137259, "supported_languages": null}, "macro.dbt.support_multiple_grantees_per_dcl_statement": {"unique_id": "macro.dbt.support_multiple_grantees_per_dcl_statement", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__support_multiple_grantees_per_dcl_statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.413876, "supported_languages": null}, "macro.dbt.default__support_multiple_grantees_per_dcl_statement": {"unique_id": "macro.dbt.default__support_multiple_grantees_per_dcl_statement", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "name": "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", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.4139771, "supported_languages": null}, "macro.dbt.should_revoke": {"unique_id": "macro.dbt.should_revoke", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.copy_grants"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.4142709, "supported_languages": null}, "macro.dbt.get_show_grant_sql": {"unique_id": "macro.dbt.get_show_grant_sql", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "name": "get_show_grant_sql", "macro_sql": "{% macro get_show_grant_sql(relation) %}\n {{ return(adapter.dispatch(\"get_show_grant_sql\", \"dbt\")(relation)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_bigquery.bigquery__get_show_grant_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.414437, "supported_languages": null}, "macro.dbt.default__get_show_grant_sql": {"unique_id": "macro.dbt.default__get_show_grant_sql", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "name": "default__get_show_grant_sql", "macro_sql": "{% macro default__get_show_grant_sql(relation) %}\n show grants on {{ relation }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.41453, "supported_languages": null}, "macro.dbt.get_grant_sql": {"unique_id": "macro.dbt.get_grant_sql", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_bigquery.bigquery__get_grant_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.414732, "supported_languages": null}, "macro.dbt.default__get_grant_sql": {"unique_id": "macro.dbt.default__get_grant_sql", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "name": "default__get_grant_sql", "macro_sql": "\n\n{%- macro default__get_grant_sql(relation, privilege, grantees) -%}\n grant {{ privilege }} on {{ relation }} to {{ grantees | join(', ') }}\n{%- endmacro -%}\n\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.4149, "supported_languages": null}, "macro.dbt.get_revoke_sql": {"unique_id": "macro.dbt.get_revoke_sql", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_bigquery.bigquery__get_revoke_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.415099, "supported_languages": null}, "macro.dbt.default__get_revoke_sql": {"unique_id": "macro.dbt.default__get_revoke_sql", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "name": "default__get_revoke_sql", "macro_sql": "\n\n{%- macro default__get_revoke_sql(relation, privilege, grantees) -%}\n revoke {{ privilege }} on {{ relation }} from {{ grantees | join(', ') }}\n{%- endmacro -%}\n\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.4152782, "supported_languages": null}, "macro.dbt.get_dcl_statement_list": {"unique_id": "macro.dbt.get_dcl_statement_list", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__get_dcl_statement_list"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.415479, "supported_languages": null}, "macro.dbt.default__get_dcl_statement_list": {"unique_id": "macro.dbt.default__get_dcl_statement_list", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.support_multiple_grantees_per_dcl_statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.4160728, "supported_languages": null}, "macro.dbt.call_dcl_statements": {"unique_id": "macro.dbt.call_dcl_statements", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__call_dcl_statements"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.4163148, "supported_languages": null}, "macro.dbt.default__call_dcl_statements": {"unique_id": "macro.dbt.default__call_dcl_statements", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.416538, "supported_languages": null}, "macro.dbt.apply_grants": {"unique_id": "macro.dbt.apply_grants", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__apply_grants"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.416747, "supported_languages": null}, "macro.dbt.default__apply_grants": {"unique_id": "macro.dbt.default__apply_grants", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "name": "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 ~': 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 %}", "resource_type": "macro", "tags": [], "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}, "patch_path": null, "arguments": [], "created_at": 1666728757.417778, "supported_languages": null}, "macro.dbt.alter_column_comment": {"unique_id": "macro.dbt.alter_column_comment", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/persist_docs.sql", "original_file_path": "macros/adapters/persist_docs.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_bigquery.bigquery__alter_column_comment"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.418489, "supported_languages": null}, "macro.dbt.default__alter_column_comment": {"unique_id": "macro.dbt.default__alter_column_comment", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/persist_docs.sql", "original_file_path": "macros/adapters/persist_docs.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.418644, "supported_languages": null}, "macro.dbt.alter_relation_comment": {"unique_id": "macro.dbt.alter_relation_comment", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/persist_docs.sql", "original_file_path": "macros/adapters/persist_docs.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__alter_relation_comment"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.418829, "supported_languages": null}, "macro.dbt.default__alter_relation_comment": {"unique_id": "macro.dbt.default__alter_relation_comment", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/persist_docs.sql", "original_file_path": "macros/adapters/persist_docs.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.418981, "supported_languages": null}, "macro.dbt.persist_docs": {"unique_id": "macro.dbt.persist_docs", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/persist_docs.sql", "original_file_path": "macros/adapters/persist_docs.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_bigquery.bigquery__persist_docs"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.419227, "supported_languages": null}, "macro.dbt.default__persist_docs": {"unique_id": "macro.dbt.default__persist_docs", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/persist_docs.sql", "original_file_path": "macros/adapters/persist_docs.sql", "name": "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 {% do run_query(alter_column_comment(relation, model.columns)) %}\n {% endif %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.run_query", "macro.dbt.alter_relation_comment", "macro.dbt.alter_column_comment"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.4196742, "supported_languages": null}, "macro.dbt.get_catalog": {"unique_id": "macro.dbt.get_catalog", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "name": "get_catalog", "macro_sql": "{% macro get_catalog(information_schema, schemas) -%}\n {{ return(adapter.dispatch('get_catalog', 'dbt')(information_schema, schemas)) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_bigquery.bigquery__get_catalog"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.421049, "supported_languages": null}, "macro.dbt.default__get_catalog": {"unique_id": "macro.dbt.default__get_catalog", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.421282, "supported_languages": null}, "macro.dbt.information_schema_name": {"unique_id": "macro.dbt.information_schema_name", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "name": "information_schema_name", "macro_sql": "{% macro information_schema_name(database) %}\n {{ return(adapter.dispatch('information_schema_name', 'dbt')(database)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__information_schema_name"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.421452, "supported_languages": null}, "macro.dbt.default__information_schema_name": {"unique_id": "macro.dbt.default__information_schema_name", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.421588, "supported_languages": null}, "macro.dbt.list_schemas": {"unique_id": "macro.dbt.list_schemas", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "name": "list_schemas", "macro_sql": "{% macro list_schemas(database) -%}\n {{ return(adapter.dispatch('list_schemas', 'dbt')(database)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_bigquery.bigquery__list_schemas"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.421748, "supported_languages": null}, "macro.dbt.default__list_schemas": {"unique_id": "macro.dbt.default__list_schemas", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.information_schema_name", "macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.4219708, "supported_languages": null}, "macro.dbt.check_schema_exists": {"unique_id": "macro.dbt.check_schema_exists", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_bigquery.bigquery__check_schema_exists"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.422168, "supported_languages": null}, "macro.dbt.default__check_schema_exists": {"unique_id": "macro.dbt.default__check_schema_exists", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.replace", "macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.422438, "supported_languages": null}, "macro.dbt.list_relations_without_caching": {"unique_id": "macro.dbt.list_relations_without_caching", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_bigquery.bigquery__list_relations_without_caching"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.4226072, "supported_languages": null}, "macro.dbt.default__list_relations_without_caching": {"unique_id": "macro.dbt.default__list_relations_without_caching", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.4227571, "supported_languages": null}, "macro.dbt.get_columns_in_relation": {"unique_id": "macro.dbt.get_columns_in_relation", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "name": "get_columns_in_relation", "macro_sql": "{% macro get_columns_in_relation(relation) -%}\n {{ return(adapter.dispatch('get_columns_in_relation', 'dbt')(relation)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_bigquery.bigquery__get_columns_in_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.424324, "supported_languages": null}, "macro.dbt.default__get_columns_in_relation": {"unique_id": "macro.dbt.default__get_columns_in_relation", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.4245372, "supported_languages": null}, "macro.dbt.sql_convert_columns_in_relation": {"unique_id": "macro.dbt.sql_convert_columns_in_relation", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.4248161, "supported_languages": null}, "macro.dbt.get_columns_in_query": {"unique_id": "macro.dbt.get_columns_in_query", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__get_columns_in_query"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.424982, "supported_languages": null}, "macro.dbt.default__get_columns_in_query": {"unique_id": "macro.dbt.default__get_columns_in_query", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "name": "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 select * from (\n {{ select_sql }}\n ) as __dbt_sbq\n where false\n limit 0\n {% endcall %}\n\n {{ return(load_result('get_columns_in_query').table.columns | map(attribute='name') | list) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.425288, "supported_languages": null}, "macro.dbt.alter_column_type": {"unique_id": "macro.dbt.alter_column_type", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_bigquery.bigquery__alter_column_type"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.425497, "supported_languages": null}, "macro.dbt.default__alter_column_type": {"unique_id": "macro.dbt.default__alter_column_type", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "name": "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 }} add column {{ adapter.quote(tmp_column) }} {{ new_column_type }};\n update {{ relation }} set {{ adapter.quote(tmp_column) }} = {{ adapter.quote(column_name) }};\n alter table {{ relation }} drop column {{ adapter.quote(column_name) }} cascade;\n alter table {{ relation }} rename column {{ adapter.quote(tmp_column) }} to {{ adapter.quote(column_name) }}\n {% endcall %}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.426039, "supported_languages": null}, "macro.dbt.alter_relation_add_remove_columns": {"unique_id": "macro.dbt.alter_relation_add_remove_columns", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__alter_relation_add_remove_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.426275, "supported_languages": null}, "macro.dbt.default__alter_relation_add_remove_columns": {"unique_id": "macro.dbt.default__alter_relation_add_remove_columns", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "name": "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 }}\n\n {% for column in add_columns %}\n add column {{ column.name }} {{ column.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.name }}{{ ',' if not loop.last }}\n {% endfor %}\n\n {%- endset -%}\n\n {% do run_query(sql) %}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.426972, "supported_languages": null}, "macro.dbt.build_ref_function": {"unique_id": "macro.dbt.build_ref_function", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/python_model/python.sql", "original_file_path": "macros/python_model/python.sql", "name": "build_ref_function", "macro_sql": "{% macro build_ref_function(model) %}\n\n {%- set ref_dict = {} -%}\n {%- for _ref in model.refs -%}\n {%- set resolved = ref(*_ref) -%}\n {%- do ref_dict.update({_ref | join(\".\"): resolved.quote(database=False, schema=False, identifier=False) | string}) -%}\n {%- endfor -%}\n\ndef ref(*args,dbt_load_df_function):\n refs = {{ ref_dict | tojson }}\n key = \".\".join(args)\n return dbt_load_df_function(refs[key])\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.428363, "supported_languages": null}, "macro.dbt.build_source_function": {"unique_id": "macro.dbt.build_source_function", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/python_model/python.sql", "original_file_path": "macros/python_model/python.sql", "name": "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(\".\"): resolved.quote(database=False, schema=False, identifier=False) | string}) -%}\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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.428789, "supported_languages": null}, "macro.dbt.build_config_dict": {"unique_id": "macro.dbt.build_config_dict", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/python_model/python.sql", "original_file_path": "macros/python_model/python.sql", "name": "build_config_dict", "macro_sql": "{% macro build_config_dict(model) %}\n {%- set config_dict = {} -%}\n {%- for key in model.config.config_keys_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[key] -%}\n {%- do config_dict.update({key: value}) -%}\n {%- endfor -%}\nconfig_dict = {{ config_dict }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.4292, "supported_languages": null}, "macro.dbt.py_script_postfix": {"unique_id": "macro.dbt.py_script_postfix", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/python_model/python.sql", "original_file_path": "macros/python_model/python.sql", "name": "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\nclass this:\n \"\"\"dbt.this() or dbt.this.identifier\"\"\"\n database = '{{ this.database }}'\n schema = '{{ this.schema }}'\n identifier = '{{ this.identifier }}'\n def __repr__(self):\n return '{{ this }}'\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: ref(*args, 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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.build_ref_function", "macro.dbt.build_source_function", "macro.dbt.build_config_dict", "macro.dbt.is_incremental", "macro.dbt.py_script_comment"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.4295812, "supported_languages": null}, "macro.dbt.py_script_comment": {"unique_id": "macro.dbt.py_script_comment", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/python_model/python.sql", "original_file_path": "macros/python_model/python.sql", "name": "py_script_comment", "macro_sql": "{%macro py_script_comment()%}\n{%endmacro%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.4296541, "supported_languages": null}, "macro.dbt.test_unique": {"unique_id": "macro.dbt.test_unique", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "tests/generic/builtin.sql", "original_file_path": "tests/generic/builtin.sql", "name": "test_unique", "macro_sql": "{% test unique(model, column_name) %}\n {% set macro = adapter.dispatch('test_unique', 'dbt') %}\n {{ macro(model, column_name) }}\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_bigquery.bigquery__test_unique"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.4302049, "supported_languages": null}, "macro.dbt.test_not_null": {"unique_id": "macro.dbt.test_not_null", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "tests/generic/builtin.sql", "original_file_path": "tests/generic/builtin.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__test_not_null"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.430422, "supported_languages": null}, "macro.dbt.test_accepted_values": {"unique_id": "macro.dbt.test_accepted_values", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "tests/generic/builtin.sql", "original_file_path": "tests/generic/builtin.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__test_accepted_values"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.430675, "supported_languages": null}, "macro.dbt.test_relationships": {"unique_id": "macro.dbt.test_relationships", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "tests/generic/builtin.sql", "original_file_path": "tests/generic/builtin.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__test_relationships"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.430915, "supported_languages": null}, "macro.dbt_utils.xdb_deprecation_warning_without_replacement": {"unique_id": "macro.dbt_utils.xdb_deprecation_warning_without_replacement", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/deprecated/xdb_deprecation_warning.sql", "original_file_path": "macros/cross_db_utils/deprecated/xdb_deprecation_warning.sql", "name": "xdb_deprecation_warning_without_replacement", "macro_sql": "{% macro xdb_deprecation_warning_without_replacement(macro, package, model) %}\n {%- set error_message = \"Warning: the `\" ~ macro ~\"` macro is deprecated and will be removed in a future version of the package, once equivalent functionality is implemented in dbt Core. The \" ~ package ~ \".\" ~ model ~ \" model triggered this warning.\" -%}\n {%- do exceptions.warn(error_message) -%}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.4312692, "supported_languages": null}, "macro.dbt_utils.get_url_host": {"unique_id": "macro.dbt_utils.get_url_host", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/web/get_url_host.sql", "original_file_path": "macros/web/get_url_host.sql", "name": "get_url_host", "macro_sql": "{% macro get_url_host(field) -%}\n {{ return(adapter.dispatch('get_url_host', 'dbt_utils')(field)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__get_url_host"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.4316218, "supported_languages": null}, "macro.dbt_utils.default__get_url_host": {"unique_id": "macro.dbt_utils.default__get_url_host", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/web/get_url_host.sql", "original_file_path": "macros/web/get_url_host.sql", "name": "default__get_url_host", "macro_sql": "{% macro default__get_url_host(field) -%}\n\n{%- set parsed =\n split_part(\n split_part(\n replace(\n replace(\n replace(field, \"'android-app://'\", \"''\"\n ), \"'http://'\", \"''\"\n ), \"'https://'\", \"''\"\n ), \"'/'\", 1\n ), \"'?'\", 1\n )\n\n-%}\n\n\n {{ dbt.safe_cast(\n parsed,\n type_string()\n )}}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "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}, "patch_path": null, "arguments": [], "created_at": 1666728757.432076, "supported_languages": null}, "macro.dbt_utils.get_url_path": {"unique_id": "macro.dbt_utils.get_url_path", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/web/get_url_path.sql", "original_file_path": "macros/web/get_url_path.sql", "name": "get_url_path", "macro_sql": "{% macro get_url_path(field) -%}\n {{ return(adapter.dispatch('get_url_path', 'dbt_utils')(field)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__get_url_path"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.432551, "supported_languages": null}, "macro.dbt_utils.default__get_url_path": {"unique_id": "macro.dbt_utils.default__get_url_path", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/web/get_url_path.sql", "original_file_path": "macros/web/get_url_path.sql", "name": "default__get_url_path", "macro_sql": "{% macro default__get_url_path(field) -%}\n\n {%- set stripped_url =\n replace(\n replace(field, \"'http://'\", \"''\"), \"'https://'\", \"''\")\n -%}\n\n {%- set first_slash_pos -%}\n coalesce(\n nullif({{ position(\"'/'\", stripped_url) }}, 0),\n {{ position(\"'?'\", stripped_url) }} - 1\n )\n {%- endset -%}\n\n {%- set parsed_path =\n split_part(\n right(\n stripped_url,\n length(stripped_url) ~ \"-\" ~ first_slash_pos\n ),\n \"'?'\", 1\n )\n -%}\n\n {{ safe_cast(\n parsed_path,\n type_string()\n )}}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "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}, "patch_path": null, "arguments": [], "created_at": 1666728757.433077, "supported_languages": null}, "macro.dbt_utils.get_url_parameter": {"unique_id": "macro.dbt_utils.get_url_parameter", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/web/get_url_parameter.sql", "original_file_path": "macros/web/get_url_parameter.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__get_url_parameter"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.433412, "supported_languages": null}, "macro.dbt_utils.default__get_url_parameter": {"unique_id": "macro.dbt_utils.default__get_url_parameter", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/web/get_url_parameter.sql", "original_file_path": "macros/web/get_url_parameter.sql", "name": "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 = split_part(split_part(field, formatted_url_parameter, 2), \"'&'\", 1) -%}\n\nnullif({{ split }},'')\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.split_part"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.433681, "supported_languages": null}, "macro.dbt_utils.test_fewer_rows_than": {"unique_id": "macro.dbt_utils.test_fewer_rows_than", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/fewer_rows_than.sql", "original_file_path": "macros/generic_tests/fewer_rows_than.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_fewer_rows_than"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.4346938, "supported_languages": null}, "macro.dbt_utils.default__test_fewer_rows_than": {"unique_id": "macro.dbt_utils.default__test_fewer_rows_than", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/fewer_rows_than.sql", "original_file_path": "macros/generic_tests/fewer_rows_than.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.435605, "supported_languages": null}, "macro.dbt_utils.test_equal_rowcount": {"unique_id": "macro.dbt_utils.test_equal_rowcount", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/equal_rowcount.sql", "original_file_path": "macros/generic_tests/equal_rowcount.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_equal_rowcount"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.4364429, "supported_languages": null}, "macro.dbt_utils.default__test_equal_rowcount": {"unique_id": "macro.dbt_utils.default__test_equal_rowcount", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/equal_rowcount.sql", "original_file_path": "macros/generic_tests/equal_rowcount.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.437394, "supported_languages": null}, "macro.dbt_utils.test_relationships_where": {"unique_id": "macro.dbt_utils.test_relationships_where", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/relationships_where.sql", "original_file_path": "macros/generic_tests/relationships_where.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_relationships_where"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.438069, "supported_languages": null}, "macro.dbt_utils.default__test_relationships_where": {"unique_id": "macro.dbt_utils.default__test_relationships_where", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/relationships_where.sql", "original_file_path": "macros/generic_tests/relationships_where.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.438386, "supported_languages": null}, "macro.dbt_utils.test_recency": {"unique_id": "macro.dbt_utils.test_recency", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/recency.sql", "original_file_path": "macros/generic_tests/recency.sql", "name": "test_recency", "macro_sql": "{% test recency(model, field, datepart, interval, group_by_columns = []) %}\n {{ return(adapter.dispatch('test_recency', 'dbt_utils')(model, field, datepart, interval, group_by_columns)) }}\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_recency"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.438957, "supported_languages": null}, "macro.dbt_utils.default__test_recency": {"unique_id": "macro.dbt_utils.default__test_recency", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/recency.sql", "original_file_path": "macros/generic_tests/recency.sql", "name": "default__test_recency", "macro_sql": "{% macro default__test_recency(model, field, datepart, interval, group_by_columns) %}\n\n{% set threshold = dateadd(datepart, interval * -1, current_timestamp_backcompat()) %}\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 max({{field}}) as most_recent\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\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.dateadd", "macro.dbt.current_timestamp_backcompat"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.439508, "supported_languages": null}, "macro.dbt_utils.test_not_constant": {"unique_id": "macro.dbt_utils.test_not_constant", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/not_constant.sql", "original_file_path": "macros/generic_tests/not_constant.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_not_constant"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.4399722, "supported_languages": null}, "macro.dbt_utils.default__test_not_constant": {"unique_id": "macro.dbt_utils.default__test_not_constant", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/not_constant.sql", "original_file_path": "macros/generic_tests/not_constant.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.440377, "supported_languages": null}, "macro.dbt_utils.test_accepted_range": {"unique_id": "macro.dbt_utils.test_accepted_range", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/accepted_range.sql", "original_file_path": "macros/generic_tests/accepted_range.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_accepted_range"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.440963, "supported_languages": null}, "macro.dbt_utils.default__test_accepted_range": {"unique_id": "macro.dbt_utils.default__test_accepted_range", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/accepted_range.sql", "original_file_path": "macros/generic_tests/accepted_range.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.441374, "supported_languages": null}, "macro.dbt_utils.test_not_accepted_values": {"unique_id": "macro.dbt_utils.test_not_accepted_values", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/not_accepted_values.sql", "original_file_path": "macros/generic_tests/not_accepted_values.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_not_accepted_values"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.441896, "supported_languages": null}, "macro.dbt_utils.default__test_not_accepted_values": {"unique_id": "macro.dbt_utils.default__test_not_accepted_values", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/not_accepted_values.sql", "original_file_path": "macros/generic_tests/not_accepted_values.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.442297, "supported_languages": null}, "macro.dbt_utils.test_at_least_one": {"unique_id": "macro.dbt_utils.test_at_least_one", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/at_least_one.sql", "original_file_path": "macros/generic_tests/at_least_one.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_at_least_one"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.442754, "supported_languages": null}, "macro.dbt_utils.default__test_at_least_one": {"unique_id": "macro.dbt_utils.default__test_at_least_one", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/at_least_one.sql", "original_file_path": "macros/generic_tests/at_least_one.sql", "name": "default__test_at_least_one", "macro_sql": "{% macro default__test_at_least_one(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\nselect *\nfrom (\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 {{ model }}\n\n {{groupby_gb_cols}}\n\n having count({{ column_name }}) = 0\n\n) validation_errors\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.4431639, "supported_languages": null}, "macro.dbt_utils.test_unique_combination_of_columns": {"unique_id": "macro.dbt_utils.test_unique_combination_of_columns", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/unique_combination_of_columns.sql", "original_file_path": "macros/generic_tests/unique_combination_of_columns.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_unique_combination_of_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.443764, "supported_languages": null}, "macro.dbt_utils.default__test_unique_combination_of_columns": {"unique_id": "macro.dbt_utils.default__test_unique_combination_of_columns", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/unique_combination_of_columns.sql", "original_file_path": "macros/generic_tests/unique_combination_of_columns.sql", "name": "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 {% set column_list = 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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.444337, "supported_languages": null}, "macro.dbt_utils.test_cardinality_equality": {"unique_id": "macro.dbt_utils.test_cardinality_equality", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/cardinality_equality.sql", "original_file_path": "macros/generic_tests/cardinality_equality.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_cardinality_equality"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.4449012, "supported_languages": null}, "macro.dbt_utils.default__test_cardinality_equality": {"unique_id": "macro.dbt_utils.default__test_cardinality_equality", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/cardinality_equality.sql", "original_file_path": "macros/generic_tests/cardinality_equality.sql", "name": "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 {{ except() }}\n select *\n from table_b\n),\n\nexcept_b as (\n select *\n from table_b\n {{ 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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.except"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.445194, "supported_languages": null}, "macro.dbt_utils.test_expression_is_true": {"unique_id": "macro.dbt_utils.test_expression_is_true", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/expression_is_true.sql", "original_file_path": "macros/generic_tests/expression_is_true.sql", "name": "test_expression_is_true", "macro_sql": "{% test expression_is_true(model, expression, column_name=None, condition='1=1') %}\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 {{ return(adapter.dispatch('test_expression_is_true', 'dbt_utils')(model, expression, column_name, condition)) }}\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_expression_is_true"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.4456818, "supported_languages": null}, "macro.dbt_utils.default__test_expression_is_true": {"unique_id": "macro.dbt_utils.default__test_expression_is_true", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/expression_is_true.sql", "original_file_path": "macros/generic_tests/expression_is_true.sql", "name": "default__test_expression_is_true", "macro_sql": "{% macro default__test_expression_is_true(model, expression, column_name, condition) %}\n\n{% set column_list = '*' if should_store_failures() else \"1\" %}\n\nwith meet_condition as (\n select * from {{ model }} where {{ condition }}\n)\n\nselect\n {{ column_list }}\nfrom meet_condition\n{% if column_name is none %}\nwhere not({{ expression }})\n{%- else %}\nwhere not({{ column_name }} {{ expression }})\n{%- endif %}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.should_store_failures"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.446028, "supported_languages": null}, "macro.dbt_utils.test_not_null_proportion": {"unique_id": "macro.dbt_utils.test_not_null_proportion", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/not_null_proportion.sql", "original_file_path": "macros/generic_tests/not_null_proportion.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_not_null_proportion"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.446649, "supported_languages": null}, "macro.dbt_utils.default__test_not_null_proportion": {"unique_id": "macro.dbt_utils.default__test_not_null_proportion", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/not_null_proportion.sql", "original_file_path": "macros/generic_tests/not_null_proportion.sql", "name": "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 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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.447374, "supported_languages": null}, "macro.dbt_utils.test_sequential_values": {"unique_id": "macro.dbt_utils.test_sequential_values", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/sequential_values.sql", "original_file_path": "macros/generic_tests/sequential_values.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_sequential_values"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.44821, "supported_languages": null}, "macro.dbt_utils.default__test_sequential_values": {"unique_id": "macro.dbt_utils.default__test_sequential_values", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/sequential_values.sql", "original_file_path": "macros/generic_tests/sequential_values.sql", "name": "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 {{ type_timestamp() }})= cast({{ dateadd(datepart, interval, previous_column_name) }} as {{ type_timestamp() }}))\n {% else %}\n where not({{ column_name }} = {{ previous_column_name }} + {{ interval }})\n {% endif %}\n)\n\nselect *\nfrom validation_errors\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.slugify", "macro.dbt.type_timestamp", "macro.dbt.dateadd"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.4489741, "supported_languages": null}, "macro.dbt_utils.test_equality": {"unique_id": "macro.dbt_utils.test_equality", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/equality.sql", "original_file_path": "macros/generic_tests/equality.sql", "name": "test_equality", "macro_sql": "{% test equality(model, compare_model, compare_columns=None) %}\n {{ return(adapter.dispatch('test_equality', 'dbt_utils')(model, compare_model, compare_columns)) }}\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_equality"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.4496698, "supported_languages": null}, "macro.dbt_utils.default__test_equality": {"unique_id": "macro.dbt_utils.default__test_equality", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/equality.sql", "original_file_path": "macros/generic_tests/equality.sql", "name": "default__test_equality", "macro_sql": "{% macro default__test_equality(model, compare_model, compare_columns=None) %}\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-- setup\n{%- do dbt_utils._is_relation(model, 'test_equality') -%}\n\n{#-\nIf the compare_cols arg is provided, we can run this test without querying the\ninformation schema\u00a0\u2014 this allows the model to be an ephemeral model\n-#}\n\n{%- if not compare_columns -%}\n {%- do dbt_utils._is_ephemeral(model, 'test_equality') -%}\n {%- set compare_columns = adapter.get_columns_in_relation(model) | map(attribute='quoted') -%}\n{%- endif -%}\n\n{% set compare_cols_csv = compare_columns | join(', ') %}\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 {{ except() }}\n select {{compare_cols_csv}} from b\n\n),\n\nb_minus_a as (\n\n select {{compare_cols_csv}} from b\n {{ 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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils._is_relation", "macro.dbt_utils._is_ephemeral", "macro.dbt.except"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.450428, "supported_languages": null}, "macro.dbt_utils.test_not_empty_string": {"unique_id": "macro.dbt_utils.test_not_empty_string", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/not_empty_string.sql", "original_file_path": "macros/generic_tests/not_empty_string.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_not_empty_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.450918, "supported_languages": null}, "macro.dbt_utils.default__test_not_empty_string": {"unique_id": "macro.dbt_utils.default__test_not_empty_string", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/not_empty_string.sql", "original_file_path": "macros/generic_tests/not_empty_string.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.4511812, "supported_languages": null}, "macro.dbt_utils.test_mutually_exclusive_ranges": {"unique_id": "macro.dbt_utils.test_mutually_exclusive_ranges", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/mutually_exclusive_ranges.sql", "original_file_path": "macros/generic_tests/mutually_exclusive_ranges.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_mutually_exclusive_ranges"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.45419, "supported_languages": null}, "macro.dbt_utils.default__test_mutually_exclusive_ranges": {"unique_id": "macro.dbt_utils.default__test_mutually_exclusive_ranges", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/mutually_exclusive_ranges.sql", "original_file_path": "macros/generic_tests/mutually_exclusive_ranges.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.455599, "supported_languages": null}, "macro.dbt_utils.pretty_log_format": {"unique_id": "macro.dbt_utils.pretty_log_format", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/jinja_helpers/pretty_log_format.sql", "original_file_path": "macros/jinja_helpers/pretty_log_format.sql", "name": "pretty_log_format", "macro_sql": "{% macro pretty_log_format(message) %}\n {{ return(adapter.dispatch('pretty_log_format', 'dbt_utils')(message)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__pretty_log_format"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.4558961, "supported_languages": null}, "macro.dbt_utils.default__pretty_log_format": {"unique_id": "macro.dbt_utils.default__pretty_log_format", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/jinja_helpers/pretty_log_format.sql", "original_file_path": "macros/jinja_helpers/pretty_log_format.sql", "name": "default__pretty_log_format", "macro_sql": "{% macro default__pretty_log_format(message) %}\n {{ return( dbt_utils.pretty_time() ~ ' + ' ~ message) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.pretty_time"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.456044, "supported_languages": null}, "macro.dbt_utils._is_relation": {"unique_id": "macro.dbt_utils._is_relation", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/jinja_helpers/_is_relation.sql", "original_file_path": "macros/jinja_helpers/_is_relation.sql", "name": "_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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.456491, "supported_languages": null}, "macro.dbt_utils.pretty_time": {"unique_id": "macro.dbt_utils.pretty_time", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/jinja_helpers/pretty_time.sql", "original_file_path": "macros/jinja_helpers/pretty_time.sql", "name": "pretty_time", "macro_sql": "{% macro pretty_time(format='%H:%M:%S') %}\n {{ return(adapter.dispatch('pretty_time', 'dbt_utils')(format)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__pretty_time"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.4568, "supported_languages": null}, "macro.dbt_utils.default__pretty_time": {"unique_id": "macro.dbt_utils.default__pretty_time", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/jinja_helpers/pretty_time.sql", "original_file_path": "macros/jinja_helpers/pretty_time.sql", "name": "default__pretty_time", "macro_sql": "{% macro default__pretty_time(format='%H:%M:%S') %}\n {{ return(modules.datetime.datetime.now().strftime(format)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.456974, "supported_languages": null}, "macro.dbt_utils.log_info": {"unique_id": "macro.dbt_utils.log_info", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/jinja_helpers/log_info.sql", "original_file_path": "macros/jinja_helpers/log_info.sql", "name": "log_info", "macro_sql": "{% macro log_info(message) %}\n {{ return(adapter.dispatch('log_info', 'dbt_utils')(message)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__log_info"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.457249, "supported_languages": null}, "macro.dbt_utils.default__log_info": {"unique_id": "macro.dbt_utils.default__log_info", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/jinja_helpers/log_info.sql", "original_file_path": "macros/jinja_helpers/log_info.sql", "name": "default__log_info", "macro_sql": "{% macro default__log_info(message) %}\n {{ log(dbt_utils.pretty_log_format(message), info=True) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.pretty_log_format"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.457401, "supported_languages": null}, "macro.dbt_utils.slugify": {"unique_id": "macro.dbt_utils.slugify", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/jinja_helpers/slugify.sql", "original_file_path": "macros/jinja_helpers/slugify.sql", "name": "slugify", "macro_sql": "{% macro slugify(string) %}\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\n{{ return(string) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.457864, "supported_languages": null}, "macro.dbt_utils._is_ephemeral": {"unique_id": "macro.dbt_utils._is_ephemeral", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/jinja_helpers/_is_ephemeral.sql", "original_file_path": "macros/jinja_helpers/_is_ephemeral.sql", "name": "_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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.458633, "supported_languages": null}, "macro.dbt_utils.get_intervals_between": {"unique_id": "macro.dbt_utils.get_intervals_between", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/date_spine.sql", "original_file_path": "macros/sql/date_spine.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__get_intervals_between"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.459323, "supported_languages": null}, "macro.dbt_utils.default__get_intervals_between": {"unique_id": "macro.dbt_utils.default__get_intervals_between", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/date_spine.sql", "original_file_path": "macros/sql/date_spine.sql", "name": "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 {{ 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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement", "macro.dbt.datediff"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.4598432, "supported_languages": null}, "macro.dbt_utils.date_spine": {"unique_id": "macro.dbt_utils.date_spine", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/date_spine.sql", "original_file_path": "macros/sql/date_spine.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__date_spine"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.460046, "supported_languages": null}, "macro.dbt_utils.default__date_spine": {"unique_id": "macro.dbt_utils.default__date_spine", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/date_spine.sql", "original_file_path": "macros/sql/date_spine.sql", "name": "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 \"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 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\nfiltered as (\n\n select *\n from all_periods\n where date_{{datepart}} <= {{ end_date }}\n\n)\n\nselect * from filtered\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "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}, "patch_path": null, "arguments": [], "created_at": 1666728757.4603531, "supported_languages": null}, "macro.dbt_utils.nullcheck_table": {"unique_id": "macro.dbt_utils.nullcheck_table", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/nullcheck_table.sql", "original_file_path": "macros/sql/nullcheck_table.sql", "name": "nullcheck_table", "macro_sql": "{% macro nullcheck_table(relation) %}\n {{ return(adapter.dispatch('nullcheck_table', 'dbt_utils')(relation)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__nullcheck_table"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.4606788, "supported_languages": null}, "macro.dbt_utils.default__nullcheck_table": {"unique_id": "macro.dbt_utils.default__nullcheck_table", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/nullcheck_table.sql", "original_file_path": "macros/sql/nullcheck_table.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "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}, "patch_path": null, "arguments": [], "created_at": 1666728757.4609768, "supported_languages": null}, "macro.dbt_utils.get_relations_by_pattern": {"unique_id": "macro.dbt_utils.get_relations_by_pattern", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/get_relations_by_pattern.sql", "original_file_path": "macros/sql/get_relations_by_pattern.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__get_relations_by_pattern"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.461609, "supported_languages": null}, "macro.dbt_utils.default__get_relations_by_pattern": {"unique_id": "macro.dbt_utils.default__get_relations_by_pattern", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/get_relations_by_pattern.sql", "original_file_path": "macros/sql/get_relations_by_pattern.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement", "macro.dbt_utils.get_tables_by_pattern_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.462411, "supported_languages": null}, "macro.dbt_utils.get_powers_of_two": {"unique_id": "macro.dbt_utils.get_powers_of_two", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/generate_series.sql", "original_file_path": "macros/sql/generate_series.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__get_powers_of_two"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.463187, "supported_languages": null}, "macro.dbt_utils.default__get_powers_of_two": {"unique_id": "macro.dbt_utils.default__get_powers_of_two", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/generate_series.sql", "original_file_path": "macros/sql/generate_series.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.463552, "supported_languages": null}, "macro.dbt_utils.generate_series": {"unique_id": "macro.dbt_utils.generate_series", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/generate_series.sql", "original_file_path": "macros/sql/generate_series.sql", "name": "generate_series", "macro_sql": "{% macro generate_series(upper_bound) %}\n {{ return(adapter.dispatch('generate_series', 'dbt_utils')(upper_bound)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__generate_series"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.463718, "supported_languages": null}, "macro.dbt_utils.default__generate_series": {"unique_id": "macro.dbt_utils.default__generate_series", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/generate_series.sql", "original_file_path": "macros/sql/generate_series.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.get_powers_of_two"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.464163, "supported_languages": null}, "macro.dbt_utils.get_relations_by_prefix": {"unique_id": "macro.dbt_utils.get_relations_by_prefix", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/get_relations_by_prefix.sql", "original_file_path": "macros/sql/get_relations_by_prefix.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__get_relations_by_prefix"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.464787, "supported_languages": null}, "macro.dbt_utils.default__get_relations_by_prefix": {"unique_id": "macro.dbt_utils.default__get_relations_by_prefix", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/get_relations_by_prefix.sql", "original_file_path": "macros/sql/get_relations_by_prefix.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement", "macro.dbt_utils.get_tables_by_prefix_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.4655411, "supported_languages": null}, "macro.dbt_utils.get_tables_by_prefix_sql": {"unique_id": "macro.dbt_utils.get_tables_by_prefix_sql", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/get_tables_by_prefix_sql.sql", "original_file_path": "macros/sql/get_tables_by_prefix_sql.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__get_tables_by_prefix_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.4659462, "supported_languages": null}, "macro.dbt_utils.default__get_tables_by_prefix_sql": {"unique_id": "macro.dbt_utils.default__get_tables_by_prefix_sql", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/get_tables_by_prefix_sql.sql", "original_file_path": "macros/sql/get_tables_by_prefix_sql.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.get_tables_by_pattern_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.466199, "supported_languages": null}, "macro.dbt_utils.star": {"unique_id": "macro.dbt_utils.star", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/star.sql", "original_file_path": "macros/sql/star.sql", "name": "star", "macro_sql": "{% macro star(from, relation_alias=False, except=[], prefix='', suffix='') -%}\n {{ return(adapter.dispatch('star', 'dbt_utils')(from, relation_alias, except, prefix, suffix)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__star"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.466843, "supported_languages": null}, "macro.dbt_utils.default__star": {"unique_id": "macro.dbt_utils.default__star", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/star.sql", "original_file_path": "macros/sql/star.sql", "name": "default__star", "macro_sql": "{% macro default__star(from, relation_alias=False, except=[], prefix='', suffix='') -%}\n {%- do dbt_utils._is_relation(from, 'star') -%}\n {%- do dbt_utils._is_ephemeral(from, 'star') -%}\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 cols = dbt_utils.get_filtered_columns_in_relation(from, except) %}\n\n {%- if cols|length <= 0 -%}\n {{- return('*') -}}\n {%- else -%}\n {%- for col in cols %}\n {%- if relation_alias %}{{ relation_alias }}.{% else %}{%- endif -%}{{ adapter.quote(col)|trim }} {%- if prefix!='' or suffix!='' %} as {{ adapter.quote(prefix ~ col ~ suffix)|trim }} {%- endif -%}\n {%- if not loop.last %},{{ '\\n ' }}{% endif %}\n {%- endfor -%}\n {% endif %}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "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}, "patch_path": null, "arguments": [], "created_at": 1666728757.4677079, "supported_languages": null}, "macro.dbt_utils.unpivot": {"unique_id": "macro.dbt_utils.unpivot", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/unpivot.sql", "original_file_path": "macros/sql/unpivot.sql", "name": "unpivot", "macro_sql": "{% macro unpivot(relation=none, cast_to='varchar', exclude=none, remove=none, field_name='field_name', value_name='value') -%}\n {{ return(adapter.dispatch('unpivot', 'dbt_utils')(relation, cast_to, exclude, remove, field_name, value_name)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__unpivot"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.468877, "supported_languages": null}, "macro.dbt_utils.default__unpivot": {"unique_id": "macro.dbt_utils.default__unpivot", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/unpivot.sql", "original_file_path": "macros/sql/unpivot.sql", "name": "default__unpivot", "macro_sql": "{% macro default__unpivot(relation=none, cast_to='varchar', exclude=none, remove=none, field_name='field_name', value_name='value') -%}\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 select\n {%- for exclude_col in exclude %}\n {{ exclude_col }},\n {%- endfor %}\n\n cast('{{ col.column }}' as {{ type_string() }}) as {{ field_name }},\n cast( {% if col.data_type == 'boolean' %}\n {{ cast_bool_to_text(col.column) }}\n {% else %}\n {{ col.column }}\n {% endif %}\n as {{ cast_to }}) as {{ value_name }}\n\n from {{ relation }}\n\n {% if not loop.last -%}\n union all\n {% endif -%}\n {%- endfor -%}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "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}, "patch_path": null, "arguments": [], "created_at": 1666728757.4704719, "supported_languages": null}, "macro.dbt_utils.union_relations": {"unique_id": "macro.dbt_utils.union_relations", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/union.sql", "original_file_path": "macros/sql/union.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__union_relations"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.4731672, "supported_languages": null}, "macro.dbt_utils.default__union_relations": {"unique_id": "macro.dbt_utils.default__union_relations", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/union.sql", "original_file_path": "macros/sql/union.sql", "name": "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({{ string_literal(relation) }} as {{ 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 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 -%}", "resource_type": "macro", "tags": [], "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}, "patch_path": null, "arguments": [], "created_at": 1666728757.476178, "supported_languages": null}, "macro.dbt_utils.group_by": {"unique_id": "macro.dbt_utils.group_by", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/groupby.sql", "original_file_path": "macros/sql/groupby.sql", "name": "group_by", "macro_sql": "{%- macro group_by(n) -%}\n {{ return(adapter.dispatch('group_by', 'dbt_utils')(n)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__group_by"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.4765, "supported_languages": null}, "macro.dbt_utils.default__group_by": {"unique_id": "macro.dbt_utils.default__group_by", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/groupby.sql", "original_file_path": "macros/sql/groupby.sql", "name": "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 -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.4767208, "supported_languages": null}, "macro.dbt_utils.deduplicate": {"unique_id": "macro.dbt_utils.deduplicate", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/deduplicate.sql", "original_file_path": "macros/sql/deduplicate.sql", "name": "deduplicate", "macro_sql": "{%- macro deduplicate(relation, partition_by, order_by) -%}\n {{ return(adapter.dispatch('deduplicate', 'dbt_utils')(relation, partition_by, order_by)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.bigquery__deduplicate"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.4774568, "supported_languages": null}, "macro.dbt_utils.default__deduplicate": {"unique_id": "macro.dbt_utils.default__deduplicate", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/deduplicate.sql", "original_file_path": "macros/sql/deduplicate.sql", "name": "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", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.477652, "supported_languages": null}, "macro.dbt_utils.redshift__deduplicate": {"unique_id": "macro.dbt_utils.redshift__deduplicate", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/deduplicate.sql", "original_file_path": "macros/sql/deduplicate.sql", "name": "redshift__deduplicate", "macro_sql": "{% macro redshift__deduplicate(relation, partition_by, order_by) -%}\n\n {{ return(dbt_utils.default__deduplicate(relation, partition_by, order_by=order_by)) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__deduplicate"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.477827, "supported_languages": null}, "macro.dbt_utils.postgres__deduplicate": {"unique_id": "macro.dbt_utils.postgres__deduplicate", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/deduplicate.sql", "original_file_path": "macros/sql/deduplicate.sql", "name": "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", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.477997, "supported_languages": null}, "macro.dbt_utils.snowflake__deduplicate": {"unique_id": "macro.dbt_utils.snowflake__deduplicate", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/deduplicate.sql", "original_file_path": "macros/sql/deduplicate.sql", "name": "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", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.478143, "supported_languages": null}, "macro.dbt_utils.bigquery__deduplicate": {"unique_id": "macro.dbt_utils.bigquery__deduplicate", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/deduplicate.sql", "original_file_path": "macros/sql/deduplicate.sql", "name": "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 -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.4782941, "supported_languages": null}, "macro.dbt_utils.surrogate_key": {"unique_id": "macro.dbt_utils.surrogate_key", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/surrogate_key.sql", "original_file_path": "macros/sql/surrogate_key.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__surrogate_key"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.478693, "supported_languages": null}, "macro.dbt_utils.default__surrogate_key": {"unique_id": "macro.dbt_utils.default__surrogate_key", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/surrogate_key.sql", "original_file_path": "macros/sql/surrogate_key.sql", "name": "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 variable scoped to the dbt_utils package 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 -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.4789052, "supported_languages": null}, "macro.dbt_utils.safe_add": {"unique_id": "macro.dbt_utils.safe_add", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/safe_add.sql", "original_file_path": "macros/sql/safe_add.sql", "name": "safe_add", "macro_sql": "{%- macro safe_add(field_list) -%}\n {{ return(adapter.dispatch('safe_add', 'dbt_utils')(field_list)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__safe_add"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.47929, "supported_languages": null}, "macro.dbt_utils.default__safe_add": {"unique_id": "macro.dbt_utils.default__safe_add", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/safe_add.sql", "original_file_path": "macros/sql/safe_add.sql", "name": "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 -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.479769, "supported_languages": null}, "macro.dbt_utils.nullcheck": {"unique_id": "macro.dbt_utils.nullcheck", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/nullcheck.sql", "original_file_path": "macros/sql/nullcheck.sql", "name": "nullcheck", "macro_sql": "{% macro nullcheck(cols) %}\n {{ return(adapter.dispatch('nullcheck', 'dbt_utils')(cols)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__nullcheck"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.480119, "supported_languages": null}, "macro.dbt_utils.default__nullcheck": {"unique_id": "macro.dbt_utils.default__nullcheck", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/nullcheck.sql", "original_file_path": "macros/sql/nullcheck.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.4804091, "supported_languages": null}, "macro.dbt_utils.get_tables_by_pattern_sql": {"unique_id": "macro.dbt_utils.get_tables_by_pattern_sql", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/get_tables_by_pattern_sql.sql", "original_file_path": "macros/sql/get_tables_by_pattern_sql.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.bigquery__get_tables_by_pattern_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.4818718, "supported_languages": null}, "macro.dbt_utils.default__get_tables_by_pattern_sql": {"unique_id": "macro.dbt_utils.default__get_tables_by_pattern_sql", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/get_tables_by_pattern_sql.sql", "original_file_path": "macros/sql/get_tables_by_pattern_sql.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.get_table_types_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.4821901, "supported_languages": null}, "macro.dbt_utils.bigquery__get_tables_by_pattern_sql": {"unique_id": "macro.dbt_utils.bigquery__get_tables_by_pattern_sql", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/get_tables_by_pattern_sql.sql", "original_file_path": "macros/sql/get_tables_by_pattern_sql.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "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}, "patch_path": null, "arguments": [], "created_at": 1666728757.4828742, "supported_languages": null}, "macro.dbt_utils._bigquery__get_matching_schemata": {"unique_id": "macro.dbt_utils._bigquery__get_matching_schemata", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/get_tables_by_pattern_sql.sql", "original_file_path": "macros/sql/get_tables_by_pattern_sql.sql", "name": "_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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.483327, "supported_languages": null}, "macro.dbt_utils.get_column_values": {"unique_id": "macro.dbt_utils.get_column_values", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/get_column_values.sql", "original_file_path": "macros/sql/get_column_values.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__get_column_values"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.4843361, "supported_languages": null}, "macro.dbt_utils.default__get_column_values": {"unique_id": "macro.dbt_utils.default__get_column_values", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/get_column_values.sql", "original_file_path": "macros/sql/get_column_values.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils._is_ephemeral", "macro.dbt.load_relation", "macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.485663, "supported_languages": null}, "macro.dbt_utils.pivot": {"unique_id": "macro.dbt_utils.pivot", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/pivot.sql", "original_file_path": "macros/sql/pivot.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__pivot"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.486635, "supported_languages": null}, "macro.dbt_utils.default__pivot": {"unique_id": "macro.dbt_utils.default__pivot", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/pivot.sql", "original_file_path": "macros/sql/pivot.sql", "name": "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 }} '{{ 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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.escape_single_quotes", "macro.dbt_utils.slugify"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.48737, "supported_languages": null}, "macro.dbt_utils.get_filtered_columns_in_relation": {"unique_id": "macro.dbt_utils.get_filtered_columns_in_relation", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/get_filtered_columns_in_relation.sql", "original_file_path": "macros/sql/get_filtered_columns_in_relation.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__get_filtered_columns_in_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.487833, "supported_languages": null}, "macro.dbt_utils.default__get_filtered_columns_in_relation": {"unique_id": "macro.dbt_utils.default__get_filtered_columns_in_relation", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/get_filtered_columns_in_relation.sql", "original_file_path": "macros/sql/get_filtered_columns_in_relation.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils._is_relation", "macro.dbt_utils._is_ephemeral"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.488469, "supported_languages": null}, "macro.dbt_utils.width_bucket": {"unique_id": "macro.dbt_utils.width_bucket", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/width_bucket.sql", "original_file_path": "macros/sql/width_bucket.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__width_bucket"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.4897652, "supported_languages": null}, "macro.dbt_utils.default__width_bucket": {"unique_id": "macro.dbt_utils.default__width_bucket", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/width_bucket.sql", "original_file_path": "macros/sql/width_bucket.sql", "name": "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, type_numeric() ) }},\n {{ dbt.safe_cast(bin_size, 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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.safe_cast", "macro.dbt.type_numeric"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.490158, "supported_languages": null}, "macro.dbt_utils.redshift__width_bucket": {"unique_id": "macro.dbt_utils.redshift__width_bucket", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/width_bucket.sql", "original_file_path": "macros/sql/width_bucket.sql", "name": "redshift__width_bucket", "macro_sql": "{% macro redshift__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 exactly at the bucket edge\n case\n when\n {{ dbt.safe_cast(expr, type_numeric() ) }} %\n {{ dbt.safe_cast(bin_size, 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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.safe_cast", "macro.dbt.type_numeric"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.490547, "supported_languages": null}, "macro.dbt_utils.snowflake__width_bucket": {"unique_id": "macro.dbt_utils.snowflake__width_bucket", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/width_bucket.sql", "original_file_path": "macros/sql/width_bucket.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.4907131, "supported_languages": null}, "macro.dbt_utils.get_query_results_as_dict": {"unique_id": "macro.dbt_utils.get_query_results_as_dict", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/get_query_results_as_dict.sql", "original_file_path": "macros/sql/get_query_results_as_dict.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__get_query_results_as_dict"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.491102, "supported_languages": null}, "macro.dbt_utils.default__get_query_results_as_dict": {"unique_id": "macro.dbt_utils.default__get_query_results_as_dict", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/get_query_results_as_dict.sql", "original_file_path": "macros/sql/get_query_results_as_dict.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.49162, "supported_languages": null}, "macro.dbt_utils.generate_surrogate_key": {"unique_id": "macro.dbt_utils.generate_surrogate_key", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/generate_surrogate_key.sql", "original_file_path": "macros/sql/generate_surrogate_key.sql", "name": "generate_surrogate_key", "macro_sql": "{%- macro generate_surrogate_key(field_list) -%}\n {{ return(adapter.dispatch('generate_surrogate_key', 'dbt_utils')(field_list)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__generate_surrogate_key"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.492067, "supported_languages": null}, "macro.dbt_utils.default__generate_surrogate_key": {"unique_id": "macro.dbt_utils.default__generate_surrogate_key", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/generate_surrogate_key.sql", "original_file_path": "macros/sql/generate_surrogate_key.sql", "name": "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 \" ~ type_string() ~ \"), '\" ~ default_null_value ~\"')\"\n ) -%}\n\n {%- if not loop.last %}\n {%- do fields.append(\"'-'\") -%}\n {%- endif -%}\n\n{%- endfor -%}\n\n{{ hash(concat(fields)) }}\n\n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.type_string", "macro.dbt.hash", "macro.dbt.concat"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.4926238, "supported_languages": null}, "macro.dbt_utils.get_table_types_sql": {"unique_id": "macro.dbt_utils.get_table_types_sql", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/get_table_types_sql.sql", "original_file_path": "macros/sql/get_table_types_sql.sql", "name": "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", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__get_table_types_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.493014, "supported_languages": null}, "macro.dbt_utils.default__get_table_types_sql": {"unique_id": "macro.dbt_utils.default__get_table_types_sql", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/get_table_types_sql.sql", "original_file_path": "macros/sql/get_table_types_sql.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.493144, "supported_languages": null}, "macro.dbt_utils.postgres__get_table_types_sql": {"unique_id": "macro.dbt_utils.postgres__get_table_types_sql", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/get_table_types_sql.sql", "original_file_path": "macros/sql/get_table_types_sql.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.493263, "supported_languages": null}, "macro.dbt_utils.degrees_to_radians": {"unique_id": "macro.dbt_utils.degrees_to_radians", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/haversine_distance.sql", "original_file_path": "macros/sql/haversine_distance.sql", "name": "degrees_to_radians", "macro_sql": "{% macro degrees_to_radians(degrees) -%}\n acos(-1) * {{degrees}} / 180\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.4942532, "supported_languages": null}, "macro.dbt_utils.haversine_distance": {"unique_id": "macro.dbt_utils.haversine_distance", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/haversine_distance.sql", "original_file_path": "macros/sql/haversine_distance.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.bigquery__haversine_distance"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.494564, "supported_languages": null}, "macro.dbt_utils.default__haversine_distance": {"unique_id": "macro.dbt_utils.default__haversine_distance", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/haversine_distance.sql", "original_file_path": "macros/sql/haversine_distance.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.496083, "supported_languages": null}, "macro.dbt_utils.bigquery__haversine_distance": {"unique_id": "macro.dbt_utils.bigquery__haversine_distance", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/haversine_distance.sql", "original_file_path": "macros/sql/haversine_distance.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.degrees_to_radians"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.496792, "supported_languages": null}, "macro.spark_utils.get_tables": {"unique_id": "macro.spark_utils.get_tables", "package_name": "spark_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/spark_utils", "path": "macros/maintenance_operation.sql", "original_file_path": "macros/maintenance_operation.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.501293, "supported_languages": null}, "macro.spark_utils.get_delta_tables": {"unique_id": "macro.spark_utils.get_delta_tables", "package_name": "spark_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/spark_utils", "path": "macros/maintenance_operation.sql", "original_file_path": "macros/maintenance_operation.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.spark_utils.get_tables", "macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.501903, "supported_languages": null}, "macro.spark_utils.get_statistic_columns": {"unique_id": "macro.spark_utils.get_statistic_columns", "package_name": "spark_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/spark_utils", "path": "macros/maintenance_operation.sql", "original_file_path": "macros/maintenance_operation.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.502676, "supported_languages": null}, "macro.spark_utils.spark_optimize_delta_tables": {"unique_id": "macro.spark_utils.spark_optimize_delta_tables", "package_name": "spark_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/spark_utils", "path": "macros/maintenance_operation.sql", "original_file_path": "macros/maintenance_operation.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "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}, "patch_path": null, "arguments": [], "created_at": 1666728757.5033312, "supported_languages": null}, "macro.spark_utils.spark_vacuum_delta_tables": {"unique_id": "macro.spark_utils.spark_vacuum_delta_tables", "package_name": "spark_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/spark_utils", "path": "macros/maintenance_operation.sql", "original_file_path": "macros/maintenance_operation.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "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}, "patch_path": null, "arguments": [], "created_at": 1666728757.503974, "supported_languages": null}, "macro.spark_utils.spark_analyze_tables": {"unique_id": "macro.spark_utils.spark_analyze_tables", "package_name": "spark_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/spark_utils", "path": "macros/maintenance_operation.sql", "original_file_path": "macros/maintenance_operation.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "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}, "patch_path": null, "arguments": [], "created_at": 1666728757.504761, "supported_languages": null}, "macro.spark_utils.spark__concat": {"unique_id": "macro.spark_utils.spark__concat", "package_name": "spark_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/spark_utils", "path": "macros/dbt_utils/cross_db_utils/concat.sql", "original_file_path": "macros/dbt_utils/cross_db_utils/concat.sql", "name": "spark__concat", "macro_sql": "{% macro spark__concat(fields) -%}\n concat({{ fields|join(', ') }})\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.5049758, "supported_languages": null}, "macro.spark_utils.spark__type_numeric": {"unique_id": "macro.spark_utils.spark__type_numeric", "package_name": "spark_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/spark_utils", "path": "macros/dbt_utils/cross_db_utils/datatypes.sql", "original_file_path": "macros/dbt_utils/cross_db_utils/datatypes.sql", "name": "spark__type_numeric", "macro_sql": "{% macro spark__type_numeric() %}\n decimal(28, 6)\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.505126, "supported_languages": null}, "macro.spark_utils.spark__dateadd": {"unique_id": "macro.spark_utils.spark__dateadd", "package_name": "spark_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/spark_utils", "path": "macros/dbt_utils/cross_db_utils/dateadd.sql", "original_file_path": "macros/dbt_utils/cross_db_utils/dateadd.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.spark_utils.assert_not_null"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.507597, "supported_languages": null}, "macro.spark_utils.spark__datediff": {"unique_id": "macro.spark_utils.spark__datediff", "package_name": "spark_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/spark_utils", "path": "macros/dbt_utils/cross_db_utils/datediff.sql", "original_file_path": "macros/dbt_utils/cross_db_utils/datediff.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.spark_utils.assert_not_null"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.514014, "supported_languages": null}, "macro.spark_utils.spark__current_timestamp": {"unique_id": "macro.spark_utils.spark__current_timestamp", "package_name": "spark_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/spark_utils", "path": "macros/dbt_utils/cross_db_utils/current_timestamp.sql", "original_file_path": "macros/dbt_utils/cross_db_utils/current_timestamp.sql", "name": "spark__current_timestamp", "macro_sql": "{% macro spark__current_timestamp() %}\n current_timestamp()\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.5141919, "supported_languages": null}, "macro.spark_utils.spark__current_timestamp_in_utc": {"unique_id": "macro.spark_utils.spark__current_timestamp_in_utc", "package_name": "spark_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/spark_utils", "path": "macros/dbt_utils/cross_db_utils/current_timestamp.sql", "original_file_path": "macros/dbt_utils/cross_db_utils/current_timestamp.sql", "name": "spark__current_timestamp_in_utc", "macro_sql": "{% macro spark__current_timestamp_in_utc() %}\n unix_timestamp()\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.5142558, "supported_languages": null}, "macro.spark_utils.spark__split_part": {"unique_id": "macro.spark_utils.spark__split_part", "package_name": "spark_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/spark_utils", "path": "macros/dbt_utils/cross_db_utils/split_part.sql", "original_file_path": "macros/dbt_utils/cross_db_utils/split_part.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.514803, "supported_languages": null}, "macro.spark_utils.spark__get_relations_by_pattern": {"unique_id": "macro.spark_utils.spark__get_relations_by_pattern", "package_name": "spark_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/spark_utils", "path": "macros/dbt_utils/sql/get_relations_by_prefix.sql", "original_file_path": "macros/dbt_utils/sql/get_relations_by_prefix.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.5162292, "supported_languages": null}, "macro.spark_utils.spark__get_relations_by_prefix": {"unique_id": "macro.spark_utils.spark__get_relations_by_prefix", "package_name": "spark_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/spark_utils", "path": "macros/dbt_utils/sql/get_relations_by_prefix.sql", "original_file_path": "macros/dbt_utils/sql/get_relations_by_prefix.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.spark_utils.spark__get_relations_by_pattern"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.5165231, "supported_languages": null}, "macro.spark_utils.spark__get_tables_by_pattern": {"unique_id": "macro.spark_utils.spark__get_tables_by_pattern", "package_name": "spark_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/spark_utils", "path": "macros/dbt_utils/sql/get_relations_by_prefix.sql", "original_file_path": "macros/dbt_utils/sql/get_relations_by_prefix.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.spark_utils.spark__get_relations_by_pattern"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.5167701, "supported_languages": null}, "macro.spark_utils.spark__get_tables_by_prefix": {"unique_id": "macro.spark_utils.spark__get_tables_by_prefix", "package_name": "spark_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/spark_utils", "path": "macros/dbt_utils/sql/get_relations_by_prefix.sql", "original_file_path": "macros/dbt_utils/sql/get_relations_by_prefix.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.spark_utils.spark__get_relations_by_prefix"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.5170088, "supported_languages": null}, "macro.spark_utils.assert_not_null": {"unique_id": "macro.spark_utils.assert_not_null", "package_name": "spark_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/spark_utils", "path": "macros/etc/assert_not_null.sql", "original_file_path": "macros/etc/assert_not_null.sql", "name": "assert_not_null", "macro_sql": "{% macro assert_not_null(function, arg) -%}\n {{ return(adapter.dispatch('assert_not_null', 'spark_utils')(function, arg)) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.spark_utils.default__assert_not_null"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.517343, "supported_languages": null}, "macro.spark_utils.default__assert_not_null": {"unique_id": "macro.spark_utils.default__assert_not_null", "package_name": "spark_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/spark_utils", "path": "macros/etc/assert_not_null.sql", "original_file_path": "macros/etc/assert_not_null.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.5175161, "supported_languages": null}, "macro.spark_utils.spark__convert_timezone": {"unique_id": "macro.spark_utils.spark__convert_timezone", "package_name": "spark_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/spark_utils", "path": "macros/snowplow/convert_timezone.sql", "original_file_path": "macros/snowplow/convert_timezone.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.517747, "supported_languages": null}, "macro.fivetran_utils.enabled_vars": {"unique_id": "macro.fivetran_utils.enabled_vars", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/enabled_vars.sql", "original_file_path": "macros/enabled_vars.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.5181382, "supported_languages": null}, "macro.fivetran_utils.percentile": {"unique_id": "macro.fivetran_utils.percentile", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/percentile.sql", "original_file_path": "macros/percentile.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.fivetran_utils.bigquery__percentile"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.519, "supported_languages": null}, "macro.fivetran_utils.default__percentile": {"unique_id": "macro.fivetran_utils.default__percentile", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/percentile.sql", "original_file_path": "macros/percentile.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.519145, "supported_languages": null}, "macro.fivetran_utils.redshift__percentile": {"unique_id": "macro.fivetran_utils.redshift__percentile", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/percentile.sql", "original_file_path": "macros/percentile.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.519289, "supported_languages": null}, "macro.fivetran_utils.bigquery__percentile": {"unique_id": "macro.fivetran_utils.bigquery__percentile", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/percentile.sql", "original_file_path": "macros/percentile.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.5194292, "supported_languages": null}, "macro.fivetran_utils.postgres__percentile": {"unique_id": "macro.fivetran_utils.postgres__percentile", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/percentile.sql", "original_file_path": "macros/percentile.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.519556, "supported_languages": null}, "macro.fivetran_utils.spark__percentile": {"unique_id": "macro.fivetran_utils.spark__percentile", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/percentile.sql", "original_file_path": "macros/percentile.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.5197, "supported_languages": null}, "macro.fivetran_utils.pivot_json_extract": {"unique_id": "macro.fivetran_utils.pivot_json_extract", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/pivot_json_extract.sql", "original_file_path": "macros/pivot_json_extract.sql", "name": "pivot_json_extract", "macro_sql": "{% macro pivot_json_extract(string, list_of_properties) %}\n\n{%- for property in list_of_properties -%}\n\nreplace( {{ fivetran_utils.json_extract(string, property) }}, '\"', '') as {{ property | replace(' ', '_') | lower }}\n\n{%- if not loop.last -%},{%- endif %}\n{% endfor -%}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.fivetran_utils.json_extract"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.520121, "supported_languages": null}, "macro.fivetran_utils.persist_pass_through_columns": {"unique_id": "macro.fivetran_utils.persist_pass_through_columns", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/persist_pass_through_columns.sql", "original_file_path": "macros/persist_pass_through_columns.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.520803, "supported_languages": null}, "macro.fivetran_utils.json_parse": {"unique_id": "macro.fivetran_utils.json_parse", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/json_parse.sql", "original_file_path": "macros/json_parse.sql", "name": "json_parse", "macro_sql": "{% macro json_parse(string, string_path) -%}\n\n{{ adapter.dispatch('json_parse', 'fivetran_utils') (string, string_path) }}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.fivetran_utils.bigquery__json_parse"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.521798, "supported_languages": null}, "macro.fivetran_utils.default__json_parse": {"unique_id": "macro.fivetran_utils.default__json_parse", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/json_parse.sql", "original_file_path": "macros/json_parse.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.522018, "supported_languages": null}, "macro.fivetran_utils.redshift__json_parse": {"unique_id": "macro.fivetran_utils.redshift__json_parse", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/json_parse.sql", "original_file_path": "macros/json_parse.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.522231, "supported_languages": null}, "macro.fivetran_utils.bigquery__json_parse": {"unique_id": "macro.fivetran_utils.bigquery__json_parse", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/json_parse.sql", "original_file_path": "macros/json_parse.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.52244, "supported_languages": null}, "macro.fivetran_utils.postgres__json_parse": {"unique_id": "macro.fivetran_utils.postgres__json_parse", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/json_parse.sql", "original_file_path": "macros/json_parse.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.52265, "supported_languages": null}, "macro.fivetran_utils.snowflake__json_parse": {"unique_id": "macro.fivetran_utils.snowflake__json_parse", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/json_parse.sql", "original_file_path": "macros/json_parse.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.522882, "supported_languages": null}, "macro.fivetran_utils.spark__json_parse": {"unique_id": "macro.fivetran_utils.spark__json_parse", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/json_parse.sql", "original_file_path": "macros/json_parse.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.523108, "supported_languages": null}, "macro.fivetran_utils.max_bool": {"unique_id": "macro.fivetran_utils.max_bool", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/max_bool.sql", "original_file_path": "macros/max_bool.sql", "name": "max_bool", "macro_sql": "{% macro max_bool(boolean_field) -%}\n\n{{ adapter.dispatch('max_bool', 'fivetran_utils') (boolean_field) }}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.fivetran_utils.bigquery__max_bool"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.523445, "supported_languages": null}, "macro.fivetran_utils.default__max_bool": {"unique_id": "macro.fivetran_utils.default__max_bool", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/max_bool.sql", "original_file_path": "macros/max_bool.sql", "name": "default__max_bool", "macro_sql": "{% macro default__max_bool(boolean_field) %}\n\n bool_or( {{ boolean_field }} )\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.523533, "supported_languages": null}, "macro.fivetran_utils.snowflake__max_bool": {"unique_id": "macro.fivetran_utils.snowflake__max_bool", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/max_bool.sql", "original_file_path": "macros/max_bool.sql", "name": "snowflake__max_bool", "macro_sql": "{% macro snowflake__max_bool(boolean_field) %}\n\n max( {{ boolean_field }} )\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.5236192, "supported_languages": null}, "macro.fivetran_utils.bigquery__max_bool": {"unique_id": "macro.fivetran_utils.bigquery__max_bool", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/max_bool.sql", "original_file_path": "macros/max_bool.sql", "name": "bigquery__max_bool", "macro_sql": "{% macro bigquery__max_bool(boolean_field) %}\n\n max( {{ boolean_field }} )\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.523703, "supported_languages": null}, "macro.fivetran_utils.calculated_fields": {"unique_id": "macro.fivetran_utils.calculated_fields", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/calculated_fields.sql", "original_file_path": "macros/calculated_fields.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.5240781, "supported_languages": null}, "macro.fivetran_utils.seed_data_helper": {"unique_id": "macro.fivetran_utils.seed_data_helper", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/seed_data_helper.sql", "original_file_path": "macros/seed_data_helper.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.524637, "supported_languages": null}, "macro.fivetran_utils.fill_pass_through_columns": {"unique_id": "macro.fivetran_utils.fill_pass_through_columns", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/fill_pass_through_columns.sql", "original_file_path": "macros/fill_pass_through_columns.sql", "name": "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.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 {% endfor %}\n{% endif %}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.525221, "supported_languages": null}, "macro.fivetran_utils.string_agg": {"unique_id": "macro.fivetran_utils.string_agg", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/string_agg.sql", "original_file_path": "macros/string_agg.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.fivetran_utils.default__string_agg"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.5256891, "supported_languages": null}, "macro.fivetran_utils.default__string_agg": {"unique_id": "macro.fivetran_utils.default__string_agg", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/string_agg.sql", "original_file_path": "macros/string_agg.sql", "name": "default__string_agg", "macro_sql": "{% macro default__string_agg(field_to_agg, delimiter) %}\n string_agg({{ field_to_agg }}, {{ delimiter }})\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.525808, "supported_languages": null}, "macro.fivetran_utils.snowflake__string_agg": {"unique_id": "macro.fivetran_utils.snowflake__string_agg", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/string_agg.sql", "original_file_path": "macros/string_agg.sql", "name": "snowflake__string_agg", "macro_sql": "{% macro snowflake__string_agg(field_to_agg, delimiter) %}\n listagg({{ field_to_agg }}, {{ delimiter }})\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.525919, "supported_languages": null}, "macro.fivetran_utils.redshift__string_agg": {"unique_id": "macro.fivetran_utils.redshift__string_agg", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/string_agg.sql", "original_file_path": "macros/string_agg.sql", "name": "redshift__string_agg", "macro_sql": "{% macro redshift__string_agg(field_to_agg, delimiter) %}\n listagg({{ field_to_agg }}, {{ delimiter }})\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.526028, "supported_languages": null}, "macro.fivetran_utils.spark__string_agg": {"unique_id": "macro.fivetran_utils.spark__string_agg", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/string_agg.sql", "original_file_path": "macros/string_agg.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.526203, "supported_languages": null}, "macro.fivetran_utils.timestamp_diff": {"unique_id": "macro.fivetran_utils.timestamp_diff", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/timestamp_diff.sql", "original_file_path": "macros/timestamp_diff.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.fivetran_utils.bigquery__timestamp_diff"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.528755, "supported_languages": null}, "macro.fivetran_utils.default__timestamp_diff": {"unique_id": "macro.fivetran_utils.default__timestamp_diff", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/timestamp_diff.sql", "original_file_path": "macros/timestamp_diff.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.5289001, "supported_languages": null}, "macro.fivetran_utils.redshift__timestamp_diff": {"unique_id": "macro.fivetran_utils.redshift__timestamp_diff", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/timestamp_diff.sql", "original_file_path": "macros/timestamp_diff.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.5290391, "supported_languages": null}, "macro.fivetran_utils.bigquery__timestamp_diff": {"unique_id": "macro.fivetran_utils.bigquery__timestamp_diff", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/timestamp_diff.sql", "original_file_path": "macros/timestamp_diff.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.529173, "supported_languages": null}, "macro.fivetran_utils.postgres__timestamp_diff": {"unique_id": "macro.fivetran_utils.postgres__timestamp_diff", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/timestamp_diff.sql", "original_file_path": "macros/timestamp_diff.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.datediff"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.530668, "supported_languages": null}, "macro.fivetran_utils.try_cast": {"unique_id": "macro.fivetran_utils.try_cast", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/try_cast.sql", "original_file_path": "macros/try_cast.sql", "name": "try_cast", "macro_sql": "{% macro try_cast(field, type) %}\n {{ adapter.dispatch('try_cast', 'fivetran_utils') (field, type) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.fivetran_utils.bigquery__try_cast"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.53146, "supported_languages": null}, "macro.fivetran_utils.default__safe_cast": {"unique_id": "macro.fivetran_utils.default__safe_cast", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/try_cast.sql", "original_file_path": "macros/try_cast.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.5315819, "supported_languages": null}, "macro.fivetran_utils.redshift__try_cast": {"unique_id": "macro.fivetran_utils.redshift__try_cast", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/try_cast.sql", "original_file_path": "macros/try_cast.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.531821, "supported_languages": null}, "macro.fivetran_utils.postgres__try_cast": {"unique_id": "macro.fivetran_utils.postgres__try_cast", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/try_cast.sql", "original_file_path": "macros/try_cast.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.5320718, "supported_languages": null}, "macro.fivetran_utils.snowflake__try_cast": {"unique_id": "macro.fivetran_utils.snowflake__try_cast", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/try_cast.sql", "original_file_path": "macros/try_cast.sql", "name": "snowflake__try_cast", "macro_sql": "{% macro snowflake__try_cast(field, type) %}\n try_cast(cast({{field}} as varchar) as {{type}})\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.532186, "supported_languages": null}, "macro.fivetran_utils.bigquery__try_cast": {"unique_id": "macro.fivetran_utils.bigquery__try_cast", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/try_cast.sql", "original_file_path": "macros/try_cast.sql", "name": "bigquery__try_cast", "macro_sql": "{% macro bigquery__try_cast(field, type) %}\n safe_cast({{field}} as {{type}})\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.5322938, "supported_languages": null}, "macro.fivetran_utils.spark__try_cast": {"unique_id": "macro.fivetran_utils.spark__try_cast", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/try_cast.sql", "original_file_path": "macros/try_cast.sql", "name": "spark__try_cast", "macro_sql": "{% macro spark__try_cast(field, type) %}\n try_cast({{field}} as {{type}})\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.5323992, "supported_languages": null}, "macro.fivetran_utils.source_relation": {"unique_id": "macro.fivetran_utils.source_relation", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/source_relation.sql", "original_file_path": "macros/source_relation.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.fivetran_utils.default__source_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.532898, "supported_languages": null}, "macro.fivetran_utils.default__source_relation": {"unique_id": "macro.fivetran_utils.default__source_relation", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/source_relation.sql", "original_file_path": "macros/source_relation.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.533398, "supported_languages": null}, "macro.fivetran_utils.first_value": {"unique_id": "macro.fivetran_utils.first_value", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/first_value.sql", "original_file_path": "macros/first_value.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.fivetran_utils.default__first_value"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.533889, "supported_languages": null}, "macro.fivetran_utils.default__first_value": {"unique_id": "macro.fivetran_utils.default__first_value", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/first_value.sql", "original_file_path": "macros/first_value.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.5340679, "supported_languages": null}, "macro.fivetran_utils.redshift__first_value": {"unique_id": "macro.fivetran_utils.redshift__first_value", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/first_value.sql", "original_file_path": "macros/first_value.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.53426, "supported_languages": null}, "macro.fivetran_utils.add_dbt_source_relation": {"unique_id": "macro.fivetran_utils.add_dbt_source_relation", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/add_dbt_source_relation.sql", "original_file_path": "macros/add_dbt_source_relation.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.53454, "supported_languages": null}, "macro.fivetran_utils.add_pass_through_columns": {"unique_id": "macro.fivetran_utils.add_pass_through_columns", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/add_pass_through_columns.sql", "original_file_path": "macros/add_pass_through_columns.sql", "name": "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.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 {% endfor %}\n\n {% endif %}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.535368, "supported_languages": null}, "macro.fivetran_utils.union_relations": {"unique_id": "macro.fivetran_utils.union_relations", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/union_relations.sql", "original_file_path": "macros/union_relations.sql", "name": "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_utils.string_literal(relation) }} as {{ dbt_utils.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", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils._is_relation", "macro.dbt.string_literal", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.538862, "supported_languages": null}, "macro.fivetran_utils.union_tables": {"unique_id": "macro.fivetran_utils.union_tables", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/union_relations.sql", "original_file_path": "macros/union_relations.sql", "name": "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 -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.union_relations"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.5391822, "supported_languages": null}, "macro.fivetran_utils.snowflake_seed_data": {"unique_id": "macro.fivetran_utils.snowflake_seed_data", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/snowflake_seed_data.sql", "original_file_path": "macros/snowflake_seed_data.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.539562, "supported_languages": null}, "macro.fivetran_utils.fill_staging_columns": {"unique_id": "macro.fivetran_utils.fill_staging_columns", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/fill_staging_columns.sql", "original_file_path": "macros/fill_staging_columns.sql", "name": "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\n{%- for column in staging_columns %}\n {% if column.name|lower in source_column_names -%}\n {{ fivetran_utils.quote_column(column) }} as \n {%- if 'alias' in column %} {{ column.alias }} {% else %} {{ fivetran_utils.quote_column(column) }} {%- endif -%}\n {%- else -%}\n cast(null as {{ column.datatype }})\n {%- if 'alias' in column %} as {{ column.alias }} {% else %} as {{ fivetran_utils.quote_column(column) }} {% endif -%}\n {%- endif -%}\n {%- if not loop.last -%} , {% endif -%}\n{% endfor %}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.fivetran_utils.quote_column"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.54094, "supported_languages": null}, "macro.fivetran_utils.quote_column": {"unique_id": "macro.fivetran_utils.quote_column", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/fill_staging_columns.sql", "original_file_path": "macros/fill_staging_columns.sql", "name": "quote_column", "macro_sql": "{% macro quote_column(column) %}\n {% if 'quote' in column %}\n {% if column.quote %}\n {% if target.type in ('bigquery', 'spark') %}\n `{{ column.name }}`\n {% elif target.type == 'snowflake' %}\n \"{{ column.name | upper }}\"\n {% else %}\n \"{{ column.name }}\"\n {% endif %}\n {% else %}\n {{ column.name }}\n {% endif %}\n {% else %}\n {{ column.name }}\n {% endif %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.5414348, "supported_languages": null}, "macro.fivetran_utils.json_extract": {"unique_id": "macro.fivetran_utils.json_extract", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/json_extract.sql", "original_file_path": "macros/json_extract.sql", "name": "json_extract", "macro_sql": "{% macro json_extract(string, string_path) -%}\n\n{{ adapter.dispatch('json_extract', 'fivetran_utils') (string, string_path) }}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.fivetran_utils.bigquery__json_extract"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.541995, "supported_languages": null}, "macro.fivetran_utils.default__json_extract": {"unique_id": "macro.fivetran_utils.default__json_extract", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/json_extract.sql", "original_file_path": "macros/json_extract.sql", "name": "default__json_extract", "macro_sql": "{% macro default__json_extract(string, string_path) %}\n\n json_extract_path_text({{string}}, {{ \"'\" ~ string_path ~ \"'\" }} )\n \n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.542131, "supported_languages": null}, "macro.fivetran_utils.snowflake__json_extract": {"unique_id": "macro.fivetran_utils.snowflake__json_extract", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/json_extract.sql", "original_file_path": "macros/json_extract.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.54227, "supported_languages": null}, "macro.fivetran_utils.redshift__json_extract": {"unique_id": "macro.fivetran_utils.redshift__json_extract", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/json_extract.sql", "original_file_path": "macros/json_extract.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.542426, "supported_languages": null}, "macro.fivetran_utils.bigquery__json_extract": {"unique_id": "macro.fivetran_utils.bigquery__json_extract", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/json_extract.sql", "original_file_path": "macros/json_extract.sql", "name": "bigquery__json_extract", "macro_sql": "{% macro bigquery__json_extract(string, string_path) %}\n\n json_extract_scalar({{string}}, {{ \"'$.\" ~ string_path ~ \"'\" }} )\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.5425558, "supported_languages": null}, "macro.fivetran_utils.postgres__json_extract": {"unique_id": "macro.fivetran_utils.postgres__json_extract", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/json_extract.sql", "original_file_path": "macros/json_extract.sql", "name": "postgres__json_extract", "macro_sql": "{% macro postgres__json_extract(string, string_path) %}\n\n {{string}}::json->>{{\"'\" ~ string_path ~ \"'\" }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.542687, "supported_languages": null}, "macro.fivetran_utils.collect_freshness": {"unique_id": "macro.fivetran_utils.collect_freshness", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/collect_freshness.sql", "original_file_path": "macros/collect_freshness.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.fivetran_utils.default__collect_freshness"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.54336, "supported_languages": null}, "macro.fivetran_utils.default__collect_freshness": {"unique_id": "macro.fivetran_utils.default__collect_freshness", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/collect_freshness.sql", "original_file_path": "macros/collect_freshness.sql", "name": "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 {{ return(load_result('collect_freshness').table) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement", "macro.dbt.current_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.544235, "supported_languages": null}, "macro.fivetran_utils.timestamp_add": {"unique_id": "macro.fivetran_utils.timestamp_add", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/timestamp_add.sql", "original_file_path": "macros/timestamp_add.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.fivetran_utils.bigquery__timestamp_add"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.544905, "supported_languages": null}, "macro.fivetran_utils.default__timestamp_add": {"unique_id": "macro.fivetran_utils.default__timestamp_add", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/timestamp_add.sql", "original_file_path": "macros/timestamp_add.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.5450509, "supported_languages": null}, "macro.fivetran_utils.bigquery__timestamp_add": {"unique_id": "macro.fivetran_utils.bigquery__timestamp_add", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/timestamp_add.sql", "original_file_path": "macros/timestamp_add.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.5451891, "supported_languages": null}, "macro.fivetran_utils.redshift__timestamp_add": {"unique_id": "macro.fivetran_utils.redshift__timestamp_add", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/timestamp_add.sql", "original_file_path": "macros/timestamp_add.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.545326, "supported_languages": null}, "macro.fivetran_utils.postgres__timestamp_add": {"unique_id": "macro.fivetran_utils.postgres__timestamp_add", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/timestamp_add.sql", "original_file_path": "macros/timestamp_add.sql", "name": "postgres__timestamp_add", "macro_sql": "{% macro postgres__timestamp_add(datepart, interval, from_timestamp) %}\n\n {{ from_timestamp }} + ((interval '1 {{ datepart }}') * ({{ interval }}))\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.54546, "supported_languages": null}, "macro.fivetran_utils.spark__timestamp_add": {"unique_id": "macro.fivetran_utils.spark__timestamp_add", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/timestamp_add.sql", "original_file_path": "macros/timestamp_add.sql", "name": "spark__timestamp_add", "macro_sql": "{% macro spark__timestamp_add(datepart, interval, from_timestamp) %}\n\n {{ dbt.dateadd(datepart, interval, from_timestamp) }}\n \n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.dateadd"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.545673, "supported_languages": null}, "macro.fivetran_utils.ceiling": {"unique_id": "macro.fivetran_utils.ceiling", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/ceiling.sql", "original_file_path": "macros/ceiling.sql", "name": "ceiling", "macro_sql": "{% macro ceiling(num) -%}\n\n{{ adapter.dispatch('ceiling', 'fivetran_utils') (num) }}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.fivetran_utils.default__ceiling"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.545951, "supported_languages": null}, "macro.fivetran_utils.default__ceiling": {"unique_id": "macro.fivetran_utils.default__ceiling", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/ceiling.sql", "original_file_path": "macros/ceiling.sql", "name": "default__ceiling", "macro_sql": "{% macro default__ceiling(num) %}\n ceiling({{ num }})\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.54604, "supported_languages": null}, "macro.fivetran_utils.snowflake__ceiling": {"unique_id": "macro.fivetran_utils.snowflake__ceiling", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/ceiling.sql", "original_file_path": "macros/ceiling.sql", "name": "snowflake__ceiling", "macro_sql": "{% macro snowflake__ceiling(num) %}\n ceil({{ num }})\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.5461261, "supported_languages": null}, "macro.fivetran_utils.remove_prefix_from_columns": {"unique_id": "macro.fivetran_utils.remove_prefix_from_columns", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/remove_prefix_from_columns.sql", "original_file_path": "macros/remove_prefix_from_columns.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.5467331, "supported_languages": null}, "macro.fivetran_utils.union_data": {"unique_id": "macro.fivetran_utils.union_data", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/union_data.sql", "original_file_path": "macros/union_data.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.fivetran_utils.default__union_data"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.548, "supported_languages": null}, "macro.fivetran_utils.default__union_data": {"unique_id": "macro.fivetran_utils.default__union_data", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/union_data.sql", "original_file_path": "macros/union_data.sql", "name": "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\n {% do relations.append(relation) %}\n \n {% endif %}\n\n {% endfor %}\n\n {{ dbt_utils.union_relations(relations) }}\n\n{% elif var(union_database_variable, none) %}\n\n {% set relations = [] %}\n\n {% for database in var(union_database_variable) %}\n\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\n {% do relations.append(relation) %}\n \n {% endif %}\n\n {% endfor %}\n\n {{ dbt_utils.union_relations(relations) }}\n\n{% else %}\n\n select * \n from {{ var(default_variable) }}\n\n{% endif %}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.union_relations"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.550118, "supported_languages": null}, "macro.fivetran_utils.dummy_coalesce_value": {"unique_id": "macro.fivetran_utils.dummy_coalesce_value", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/dummy_coalesce_value.sql", "original_file_path": "macros/dummy_coalesce_value.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.55141, "supported_languages": null}, "macro.fivetran_utils.array_agg": {"unique_id": "macro.fivetran_utils.array_agg", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/array_agg.sql", "original_file_path": "macros/array_agg.sql", "name": "array_agg", "macro_sql": "{% macro array_agg(field_to_agg) -%}\n\n{{ adapter.dispatch('array_agg', 'fivetran_utils') (field_to_agg) }}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.fivetran_utils.default__array_agg"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.551702, "supported_languages": null}, "macro.fivetran_utils.default__array_agg": {"unique_id": "macro.fivetran_utils.default__array_agg", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/array_agg.sql", "original_file_path": "macros/array_agg.sql", "name": "default__array_agg", "macro_sql": "{% macro default__array_agg(field_to_agg) %}\n array_agg({{ field_to_agg }})\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.5517921, "supported_languages": null}, "macro.fivetran_utils.redshift__array_agg": {"unique_id": "macro.fivetran_utils.redshift__array_agg", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/array_agg.sql", "original_file_path": "macros/array_agg.sql", "name": "redshift__array_agg", "macro_sql": "{% macro redshift__array_agg(field_to_agg) %}\n listagg({{ field_to_agg }}, ',')\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.551879, "supported_languages": null}, "macro.fivetran_utils.empty_variable_warning": {"unique_id": "macro.fivetran_utils.empty_variable_warning", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/empty_variable_warning.sql", "original_file_path": "macros/empty_variable_warning.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.552282, "supported_languages": null}, "macro.fivetran_utils.enabled_vars_one_true": {"unique_id": "macro.fivetran_utils.enabled_vars_one_true", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/enabled_vars_one_true.sql", "original_file_path": "macros/enabled_vars_one_true.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.5526779, "supported_languages": null}, "macro.apple_search_ads_source.get_ad_group_history_columns": {"unique_id": "macro.apple_search_ads_source.get_ad_group_history_columns", "package_name": "apple_search_ads_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "macros/get_ad_group_history_columns.sql", "original_file_path": "macros/get_ad_group_history_columns.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.type_int", "macro.dbt.type_timestamp", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.553596, "supported_languages": null}, "macro.apple_search_ads_source.get_ad_level_report_columns": {"unique_id": "macro.apple_search_ads_source.get_ad_level_report_columns", "package_name": "apple_search_ads_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "macros/get_ad_level_report_columns.sql", "original_file_path": "macros/get_ad_level_report_columns.sql", "name": "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\": \"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] %}\n\n{{ fivetran_utils.add_pass_through_columns(columns, var('apple_search_ads__ad_passthrough_metrics')) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.type_int", "macro.dbt.type_numeric", "macro.dbt.type_string", "macro.fivetran_utils.add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.5547671, "supported_languages": null}, "macro.apple_search_ads_source.get_search_term_report_columns": {"unique_id": "macro.apple_search_ads_source.get_search_term_report_columns", "package_name": "apple_search_ads_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "macros/get_search_term_report_columns.sql", "original_file_path": "macros/get_search_term_report_columns.sql", "name": "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\": \"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] %}\n\n{{ return(columns) }}\n\n{{ fivetran_utils.add_pass_through_columns(columns, var('apple_search_ads__search_term_passthrough_metrics')) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.type_string", "macro.dbt.type_int", "macro.dbt.type_numeric", "macro.fivetran_utils.add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.557017, "supported_languages": null}, "macro.apple_search_ads_source.get_keyword_report_columns": {"unique_id": "macro.apple_search_ads_source.get_keyword_report_columns", "package_name": "apple_search_ads_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "macros/get_keyword_report_columns.sql", "original_file_path": "macros/get_keyword_report_columns.sql", "name": "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\": \"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] %}\n\n{{ fivetran_utils.add_pass_through_columns(columns, var('apple_search_ads__keyword_passthrough_metrics')) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.type_int", "macro.dbt.type_numeric", "macro.dbt.type_string", "macro.fivetran_utils.add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.558004, "supported_languages": null}, "macro.apple_search_ads_source.get_campaign_report_columns": {"unique_id": "macro.apple_search_ads_source.get_campaign_report_columns", "package_name": "apple_search_ads_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "macros/get_campaign_report_columns.sql", "original_file_path": "macros/get_campaign_report_columns.sql", "name": "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\": \"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] %}\n\n{{ fivetran_utils.add_pass_through_columns(columns, var('apple_search_ads__campaign_passthrough_metrics')) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.type_int", "macro.dbt.type_numeric", "macro.dbt.type_string", "macro.fivetran_utils.add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.5589929, "supported_languages": null}, "macro.apple_search_ads_source.get_campaign_history_columns": {"unique_id": "macro.apple_search_ads_source.get_campaign_history_columns", "package_name": "apple_search_ads_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "macros/get_campaign_history_columns.sql", "original_file_path": "macros/get_campaign_history_columns.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_int", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.5598102, "supported_languages": null}, "macro.apple_search_ads_source.get_ad_history_columns": {"unique_id": "macro.apple_search_ads_source.get_ad_history_columns", "package_name": "apple_search_ads_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "macros/get_ad_history_columns.sql", "original_file_path": "macros/get_ad_history_columns.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.type_int", "macro.dbt.type_timestamp", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.560717, "supported_languages": null}, "macro.apple_search_ads_source.get_ad_group_report_columns": {"unique_id": "macro.apple_search_ads_source.get_ad_group_report_columns", "package_name": "apple_search_ads_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "macros/get_ad_group_report_columns.sql", "original_file_path": "macros/get_ad_group_report_columns.sql", "name": "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\": \"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] %}\n\n{{ fivetran_utils.add_pass_through_columns(columns, var('apple_search_ads__ad_group_passthrough_metrics')) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.type_int", "macro.dbt.type_numeric", "macro.dbt.type_string", "macro.fivetran_utils.add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.561697, "supported_languages": null}, "macro.apple_search_ads_source.get_organization_columns": {"unique_id": "macro.apple_search_ads_source.get_organization_columns", "package_name": "apple_search_ads_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "macros/get_organization_columns.sql", "original_file_path": "macros/get_organization_columns.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.type_string", "macro.dbt.type_int"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.562343, "supported_languages": null}, "macro.apple_search_ads_source.get_keyword_history_columns": {"unique_id": "macro.apple_search_ads_source.get_keyword_history_columns", "package_name": "apple_search_ads_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "macros/get_keyword_history_columns.sql", "original_file_path": "macros/get_keyword_history_columns.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "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}, "patch_path": null, "arguments": [], "created_at": 1666728757.563339, "supported_languages": null}}, "docs": {"dbt.__overview__": {"unique_id": "dbt.__overview__", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "overview.md", "original_file_path": "docs/overview.md", "name": "__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"}}, "exposures": {}, "metrics": {}, "selectors": {}, "disabled": {}, "parent_map": {"seed.apple_search_ads_integration_tests.ad_group_report_data": [], "seed.apple_search_ads_integration_tests.ad_report_data": [], "seed.apple_search_ads_integration_tests.keyword_report_data": [], "seed.apple_search_ads_integration_tests.ad_history_data": [], "seed.apple_search_ads_integration_tests.ad_group_history_data": [], "seed.apple_search_ads_integration_tests.campaign_history_data": [], "seed.apple_search_ads_integration_tests.campaign_report_data": [], "seed.apple_search_ads_integration_tests.keyword_history_data": [], "seed.apple_search_ads_integration_tests.search_term_report_data": [], "seed.apple_search_ads_integration_tests.organization_data": [], "model.apple_search_ads.apple_search_ads__ad_report": ["model.apple_search_ads_source.stg_apple_search_ads__ad_group_history", "model.apple_search_ads_source.stg_apple_search_ads__ad_history", "model.apple_search_ads_source.stg_apple_search_ads__ad_report", "model.apple_search_ads_source.stg_apple_search_ads__campaign_history", "model.apple_search_ads_source.stg_apple_search_ads__organization"], "model.apple_search_ads.apple_search_ads__ad_group_report": ["model.apple_search_ads_source.stg_apple_search_ads__ad_group_history", "model.apple_search_ads_source.stg_apple_search_ads__ad_group_report", "model.apple_search_ads_source.stg_apple_search_ads__campaign_history", "model.apple_search_ads_source.stg_apple_search_ads__organization"], "model.apple_search_ads.apple_search_ads__keyword_report": ["model.apple_search_ads_source.stg_apple_search_ads__ad_group_history", "model.apple_search_ads_source.stg_apple_search_ads__campaign_history", "model.apple_search_ads_source.stg_apple_search_ads__keyword_history", "model.apple_search_ads_source.stg_apple_search_ads__keyword_report", "model.apple_search_ads_source.stg_apple_search_ads__organization"], "model.apple_search_ads.apple_search_ads__search_term_report": ["model.apple_search_ads_source.stg_apple_search_ads__campaign_history", "model.apple_search_ads_source.stg_apple_search_ads__organization", "model.apple_search_ads_source.stg_apple_search_ads__search_term_report"], "model.apple_search_ads.apple_search_ads__campaign_report": ["model.apple_search_ads_source.stg_apple_search_ads__campaign_history", "model.apple_search_ads_source.stg_apple_search_ads__campaign_report", "model.apple_search_ads_source.stg_apple_search_ads__organization"], "model.apple_search_ads.apple_search_ads__organization_report": ["model.apple_search_ads_source.stg_apple_search_ads__campaign_history", "model.apple_search_ads_source.stg_apple_search_ads__campaign_report", "model.apple_search_ads_source.stg_apple_search_ads__organization"], "model.apple_search_ads_source.stg_apple_search_ads__campaign_history": ["model.apple_search_ads_source.stg_apple_search_ads__campaign_history_tmp", "model.apple_search_ads_source.stg_apple_search_ads__campaign_history_tmp"], "model.apple_search_ads_source.stg_apple_search_ads__ad_report": ["model.apple_search_ads_source.stg_apple_search_ads__ad_report_tmp", "model.apple_search_ads_source.stg_apple_search_ads__ad_report_tmp"], "model.apple_search_ads_source.stg_apple_search_ads__campaign_report": ["model.apple_search_ads_source.stg_apple_search_ads__campaign_report_tmp", "model.apple_search_ads_source.stg_apple_search_ads__campaign_report_tmp"], "model.apple_search_ads_source.stg_apple_search_ads__organization": ["model.apple_search_ads_source.stg_apple_search_ads__organization_tmp", "model.apple_search_ads_source.stg_apple_search_ads__organization_tmp"], "model.apple_search_ads_source.stg_apple_search_ads__keyword_report": ["model.apple_search_ads_source.stg_apple_search_ads__keyword_report_tmp", "model.apple_search_ads_source.stg_apple_search_ads__keyword_report_tmp"], "model.apple_search_ads_source.stg_apple_search_ads__keyword_history": ["model.apple_search_ads_source.stg_apple_search_ads__keyword_history_tmp", "model.apple_search_ads_source.stg_apple_search_ads__keyword_history_tmp"], "model.apple_search_ads_source.stg_apple_search_ads__search_term_report": ["model.apple_search_ads_source.stg_apple_search_ads__search_term_report_tmp", "model.apple_search_ads_source.stg_apple_search_ads__search_term_report_tmp"], "model.apple_search_ads_source.stg_apple_search_ads__ad_group_history": ["model.apple_search_ads_source.stg_apple_search_ads__ad_group_history_tmp", "model.apple_search_ads_source.stg_apple_search_ads__ad_group_history_tmp"], "model.apple_search_ads_source.stg_apple_search_ads__ad_history": ["model.apple_search_ads_source.stg_apple_search_ads__ad_history_tmp", "model.apple_search_ads_source.stg_apple_search_ads__ad_history_tmp"], "model.apple_search_ads_source.stg_apple_search_ads__ad_group_report": ["model.apple_search_ads_source.stg_apple_search_ads__ad_group_report_tmp", "model.apple_search_ads_source.stg_apple_search_ads__ad_group_report_tmp"], "model.apple_search_ads_source.stg_apple_search_ads__search_term_report_tmp": ["source.apple_search_ads_source.apple_search_ads.search_term_report"], "model.apple_search_ads_source.stg_apple_search_ads__campaign_history_tmp": ["source.apple_search_ads_source.apple_search_ads.campaign_history"], "model.apple_search_ads_source.stg_apple_search_ads__keyword_history_tmp": ["source.apple_search_ads_source.apple_search_ads.keyword_history"], "model.apple_search_ads_source.stg_apple_search_ads__ad_group_history_tmp": ["source.apple_search_ads_source.apple_search_ads.ad_group_history"], "model.apple_search_ads_source.stg_apple_search_ads__ad_group_report_tmp": ["source.apple_search_ads_source.apple_search_ads.ad_group_report"], "model.apple_search_ads_source.stg_apple_search_ads__ad_history_tmp": ["source.apple_search_ads_source.apple_search_ads.ad_history"], "model.apple_search_ads_source.stg_apple_search_ads__campaign_report_tmp": ["source.apple_search_ads_source.apple_search_ads.campaign_report"], "model.apple_search_ads_source.stg_apple_search_ads__organization_tmp": ["source.apple_search_ads_source.apple_search_ads.organization"], "model.apple_search_ads_source.stg_apple_search_ads__keyword_report_tmp": ["source.apple_search_ads_source.apple_search_ads.keyword_report"], "model.apple_search_ads_source.stg_apple_search_ads__ad_report_tmp": ["source.apple_search_ads_source.apple_search_ads.ad_level_report"], "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.dbt_utils_unique_combination_of_columns_apple_search_ads__ad_group_report_organization_id__campaign_id__ad_group_id__date_day.19d180bab9": ["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.dbt_utils_unique_combination_of_columns_apple_search_ads__ad_report_organization_id__campaign_id__ad_group_id__ad_id__date_day.54e27817a1": ["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.dbt_utils_unique_combination_of_columns_apple_search_ads__campaign_report_organization_id__campaign_id__date_day.647e56213f": ["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.dbt_utils_unique_combination_of_columns_apple_search_ads__keyword_report_organization_id__campaign_id__ad_group_id__keyword_id__date_day.78fb033a13": ["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.dbt_utils_unique_combination_of_columns_apple_search_ads__organization_report_organization_id__date_day.8bc84fccc3": ["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.dbt_utils_unique_combination_of_columns_apple_search_ads__search_term_report_search_term_text__date_day.e60fe79ec4": ["model.apple_search_ads.apple_search_ads__search_term_report"], "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_group_history_modified_at.e5d65fa28f": ["model.apple_search_ads_source.stg_apple_search_ads__ad_group_history"], "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_group_history_ad_group_id.dc128eecb7": ["model.apple_search_ads_source.stg_apple_search_ads__ad_group_history"], "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__ad_group_history_ad_group_id__modified_at.84af14c83b": ["model.apple_search_ads_source.stg_apple_search_ads__ad_group_history"], "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_group_report_ad_group_id.a115f9cfc1": ["model.apple_search_ads_source.stg_apple_search_ads__ad_group_report"], "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_group_report_date_day.4dfd46a43b": ["model.apple_search_ads_source.stg_apple_search_ads__ad_group_report"], "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__ad_group_report_ad_group_id__date_day.a0fcc4e33c": ["model.apple_search_ads_source.stg_apple_search_ads__ad_group_report"], "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_history_modified_at.2eea7e006d": ["model.apple_search_ads_source.stg_apple_search_ads__ad_history"], "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_history_ad_id.4ad3bde32a": ["model.apple_search_ads_source.stg_apple_search_ads__ad_history"], "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__ad_history_ad_id__modified_at.38599b8cba": ["model.apple_search_ads_source.stg_apple_search_ads__ad_history"], "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_report_date_day.e6252346d8": ["model.apple_search_ads_source.stg_apple_search_ads__ad_report"], "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_report_ad_group_id.a397755e9f": ["model.apple_search_ads_source.stg_apple_search_ads__ad_report"], "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_report_ad_id.d08e760c58": ["model.apple_search_ads_source.stg_apple_search_ads__ad_report"], "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__ad_report_ad_id__date_day__ad_group_id.0d8d23c516": ["model.apple_search_ads_source.stg_apple_search_ads__ad_report"], "test.apple_search_ads_source.not_null_stg_apple_search_ads__campaign_history_modified_at.f34a7a97c9": ["model.apple_search_ads_source.stg_apple_search_ads__campaign_history"], "test.apple_search_ads_source.not_null_stg_apple_search_ads__campaign_history_campaign_id.3f0f7502b8": ["model.apple_search_ads_source.stg_apple_search_ads__campaign_history"], "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__campaign_history_campaign_id__modified_at.317f970af9": ["model.apple_search_ads_source.stg_apple_search_ads__campaign_history"], "test.apple_search_ads_source.not_null_stg_apple_search_ads__campaign_report_campaign_id.b83941e728": ["model.apple_search_ads_source.stg_apple_search_ads__campaign_report"], "test.apple_search_ads_source.not_null_stg_apple_search_ads__campaign_report_date_day.c8dc10a6f3": ["model.apple_search_ads_source.stg_apple_search_ads__campaign_report"], "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__campaign_report_campaign_id__date_day.bad41b0481": ["model.apple_search_ads_source.stg_apple_search_ads__campaign_report"], "test.apple_search_ads_source.not_null_stg_apple_search_ads__keyword_history_modified_at.42fde5a287": ["model.apple_search_ads_source.stg_apple_search_ads__keyword_history"], "test.apple_search_ads_source.not_null_stg_apple_search_ads__keyword_history_keyword_id.889f83cfd2": ["model.apple_search_ads_source.stg_apple_search_ads__keyword_history"], "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__keyword_history_keyword_id__modified_at.7b06162d24": ["model.apple_search_ads_source.stg_apple_search_ads__keyword_history"], "test.apple_search_ads_source.not_null_stg_apple_search_ads__keyword_report_keyword_id.501725b09e": ["model.apple_search_ads_source.stg_apple_search_ads__keyword_report"], "test.apple_search_ads_source.not_null_stg_apple_search_ads__keyword_report_date_day.16098db928": ["model.apple_search_ads_source.stg_apple_search_ads__keyword_report"], "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__keyword_report_keyword_id__date_day.9f0099cff8": ["model.apple_search_ads_source.stg_apple_search_ads__keyword_report"], "test.apple_search_ads_source.not_null_stg_apple_search_ads__organization_organization_id.b013ce33cb": ["model.apple_search_ads_source.stg_apple_search_ads__organization"], "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__organization_organization_id.8647048f7a": ["model.apple_search_ads_source.stg_apple_search_ads__organization"], "test.apple_search_ads_source.not_null_stg_apple_search_ads__search_term_report__fivetran_id.aa430d1dad": ["model.apple_search_ads_source.stg_apple_search_ads__search_term_report"], "test.apple_search_ads_source.not_null_stg_apple_search_ads__search_term_report_date_day.fd93df3302": ["model.apple_search_ads_source.stg_apple_search_ads__search_term_report"], "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__search_term_report__fivetran_id__date_day.aad2a48344": ["model.apple_search_ads_source.stg_apple_search_ads__search_term_report"], "source.apple_search_ads_source.apple_search_ads.ad_group_history": [], "source.apple_search_ads_source.apple_search_ads.ad_group_report": [], "source.apple_search_ads_source.apple_search_ads.ad_history": [], "source.apple_search_ads_source.apple_search_ads.ad_level_report": [], "source.apple_search_ads_source.apple_search_ads.campaign_history": [], "source.apple_search_ads_source.apple_search_ads.campaign_report": [], "source.apple_search_ads_source.apple_search_ads.keyword_history": [], "source.apple_search_ads_source.apple_search_ads.keyword_report": [], "source.apple_search_ads_source.apple_search_ads.organization": [], "source.apple_search_ads_source.apple_search_ads.search_term_report": []}, "child_map": {"seed.apple_search_ads_integration_tests.ad_group_report_data": [], "seed.apple_search_ads_integration_tests.ad_report_data": [], "seed.apple_search_ads_integration_tests.keyword_report_data": [], "seed.apple_search_ads_integration_tests.ad_history_data": [], "seed.apple_search_ads_integration_tests.ad_group_history_data": [], "seed.apple_search_ads_integration_tests.campaign_history_data": [], "seed.apple_search_ads_integration_tests.campaign_report_data": [], "seed.apple_search_ads_integration_tests.keyword_history_data": [], "seed.apple_search_ads_integration_tests.search_term_report_data": [], "seed.apple_search_ads_integration_tests.organization_data": [], "model.apple_search_ads.apple_search_ads__ad_report": ["test.apple_search_ads.dbt_utils_unique_combination_of_columns_apple_search_ads__ad_report_organization_id__campaign_id__ad_group_id__ad_id__date_day.54e27817a1", "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__ad_group_report": ["test.apple_search_ads.dbt_utils_unique_combination_of_columns_apple_search_ads__ad_group_report_organization_id__campaign_id__ad_group_id__date_day.19d180bab9", "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.apple_search_ads__keyword_report": ["test.apple_search_ads.dbt_utils_unique_combination_of_columns_apple_search_ads__keyword_report_organization_id__campaign_id__ad_group_id__keyword_id__date_day.78fb033a13", "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__search_term_report": ["test.apple_search_ads.dbt_utils_unique_combination_of_columns_apple_search_ads__search_term_report_search_term_text__date_day.e60fe79ec4", "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__campaign_report": ["test.apple_search_ads.dbt_utils_unique_combination_of_columns_apple_search_ads__campaign_report_organization_id__campaign_id__date_day.647e56213f", "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": ["test.apple_search_ads.dbt_utils_unique_combination_of_columns_apple_search_ads__organization_report_organization_id__date_day.8bc84fccc3", "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_source.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_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__campaign_history_campaign_id__modified_at.317f970af9", "test.apple_search_ads_source.not_null_stg_apple_search_ads__campaign_history_campaign_id.3f0f7502b8", "test.apple_search_ads_source.not_null_stg_apple_search_ads__campaign_history_modified_at.f34a7a97c9"], "model.apple_search_ads_source.stg_apple_search_ads__ad_report": ["model.apple_search_ads.apple_search_ads__ad_report", "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__ad_report_ad_id__date_day__ad_group_id.0d8d23c516", "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_report_ad_group_id.a397755e9f", "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_report_ad_id.d08e760c58", "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_report_date_day.e6252346d8"], "model.apple_search_ads_source.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_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__campaign_report_campaign_id__date_day.bad41b0481", "test.apple_search_ads_source.not_null_stg_apple_search_ads__campaign_report_campaign_id.b83941e728", "test.apple_search_ads_source.not_null_stg_apple_search_ads__campaign_report_date_day.c8dc10a6f3"], "model.apple_search_ads_source.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_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__organization_organization_id.8647048f7a", "test.apple_search_ads_source.not_null_stg_apple_search_ads__organization_organization_id.b013ce33cb"], "model.apple_search_ads_source.stg_apple_search_ads__keyword_report": ["model.apple_search_ads.apple_search_ads__keyword_report", "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__keyword_report_keyword_id__date_day.9f0099cff8", "test.apple_search_ads_source.not_null_stg_apple_search_ads__keyword_report_date_day.16098db928", "test.apple_search_ads_source.not_null_stg_apple_search_ads__keyword_report_keyword_id.501725b09e"], "model.apple_search_ads_source.stg_apple_search_ads__keyword_history": ["model.apple_search_ads.apple_search_ads__keyword_report", "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__keyword_history_keyword_id__modified_at.7b06162d24", "test.apple_search_ads_source.not_null_stg_apple_search_ads__keyword_history_keyword_id.889f83cfd2", "test.apple_search_ads_source.not_null_stg_apple_search_ads__keyword_history_modified_at.42fde5a287"], "model.apple_search_ads_source.stg_apple_search_ads__search_term_report": ["model.apple_search_ads.apple_search_ads__search_term_report", "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__search_term_report__fivetran_id__date_day.aad2a48344", "test.apple_search_ads_source.not_null_stg_apple_search_ads__search_term_report__fivetran_id.aa430d1dad", "test.apple_search_ads_source.not_null_stg_apple_search_ads__search_term_report_date_day.fd93df3302"], "model.apple_search_ads_source.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_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__ad_group_history_ad_group_id__modified_at.84af14c83b", "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_group_history_ad_group_id.dc128eecb7", "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_group_history_modified_at.e5d65fa28f"], "model.apple_search_ads_source.stg_apple_search_ads__ad_history": ["model.apple_search_ads.apple_search_ads__ad_report", "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__ad_history_ad_id__modified_at.38599b8cba", "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_history_ad_id.4ad3bde32a", "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_history_modified_at.2eea7e006d"], "model.apple_search_ads_source.stg_apple_search_ads__ad_group_report": ["model.apple_search_ads.apple_search_ads__ad_group_report", "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__ad_group_report_ad_group_id__date_day.a0fcc4e33c", "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_group_report_ad_group_id.a115f9cfc1", "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_group_report_date_day.4dfd46a43b"], "model.apple_search_ads_source.stg_apple_search_ads__search_term_report_tmp": ["model.apple_search_ads_source.stg_apple_search_ads__search_term_report", "model.apple_search_ads_source.stg_apple_search_ads__search_term_report"], "model.apple_search_ads_source.stg_apple_search_ads__campaign_history_tmp": ["model.apple_search_ads_source.stg_apple_search_ads__campaign_history", "model.apple_search_ads_source.stg_apple_search_ads__campaign_history"], "model.apple_search_ads_source.stg_apple_search_ads__keyword_history_tmp": ["model.apple_search_ads_source.stg_apple_search_ads__keyword_history", "model.apple_search_ads_source.stg_apple_search_ads__keyword_history"], "model.apple_search_ads_source.stg_apple_search_ads__ad_group_history_tmp": ["model.apple_search_ads_source.stg_apple_search_ads__ad_group_history", "model.apple_search_ads_source.stg_apple_search_ads__ad_group_history"], "model.apple_search_ads_source.stg_apple_search_ads__ad_group_report_tmp": ["model.apple_search_ads_source.stg_apple_search_ads__ad_group_report", "model.apple_search_ads_source.stg_apple_search_ads__ad_group_report"], "model.apple_search_ads_source.stg_apple_search_ads__ad_history_tmp": ["model.apple_search_ads_source.stg_apple_search_ads__ad_history", "model.apple_search_ads_source.stg_apple_search_ads__ad_history"], "model.apple_search_ads_source.stg_apple_search_ads__campaign_report_tmp": ["model.apple_search_ads_source.stg_apple_search_ads__campaign_report", "model.apple_search_ads_source.stg_apple_search_ads__campaign_report"], "model.apple_search_ads_source.stg_apple_search_ads__organization_tmp": ["model.apple_search_ads_source.stg_apple_search_ads__organization", "model.apple_search_ads_source.stg_apple_search_ads__organization"], "model.apple_search_ads_source.stg_apple_search_ads__keyword_report_tmp": ["model.apple_search_ads_source.stg_apple_search_ads__keyword_report", "model.apple_search_ads_source.stg_apple_search_ads__keyword_report"], "model.apple_search_ads_source.stg_apple_search_ads__ad_report_tmp": ["model.apple_search_ads_source.stg_apple_search_ads__ad_report", "model.apple_search_ads_source.stg_apple_search_ads__ad_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": [], "test.apple_search_ads.dbt_utils_unique_combination_of_columns_apple_search_ads__ad_group_report_organization_id__campaign_id__ad_group_id__date_day.19d180bab9": [], "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.dbt_utils_unique_combination_of_columns_apple_search_ads__ad_report_organization_id__campaign_id__ad_group_id__ad_id__date_day.54e27817a1": [], "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.dbt_utils_unique_combination_of_columns_apple_search_ads__campaign_report_organization_id__campaign_id__date_day.647e56213f": [], "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.dbt_utils_unique_combination_of_columns_apple_search_ads__keyword_report_organization_id__campaign_id__ad_group_id__keyword_id__date_day.78fb033a13": [], "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.dbt_utils_unique_combination_of_columns_apple_search_ads__organization_report_organization_id__date_day.8bc84fccc3": [], "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.dbt_utils_unique_combination_of_columns_apple_search_ads__search_term_report_search_term_text__date_day.e60fe79ec4": [], "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_group_history_modified_at.e5d65fa28f": [], "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_group_history_ad_group_id.dc128eecb7": [], "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__ad_group_history_ad_group_id__modified_at.84af14c83b": [], "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_group_report_ad_group_id.a115f9cfc1": [], "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_group_report_date_day.4dfd46a43b": [], "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__ad_group_report_ad_group_id__date_day.a0fcc4e33c": [], "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_history_modified_at.2eea7e006d": [], "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_history_ad_id.4ad3bde32a": [], "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__ad_history_ad_id__modified_at.38599b8cba": [], "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_report_date_day.e6252346d8": [], "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_report_ad_group_id.a397755e9f": [], "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_report_ad_id.d08e760c58": [], "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__ad_report_ad_id__date_day__ad_group_id.0d8d23c516": [], "test.apple_search_ads_source.not_null_stg_apple_search_ads__campaign_history_modified_at.f34a7a97c9": [], "test.apple_search_ads_source.not_null_stg_apple_search_ads__campaign_history_campaign_id.3f0f7502b8": [], "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__campaign_history_campaign_id__modified_at.317f970af9": [], "test.apple_search_ads_source.not_null_stg_apple_search_ads__campaign_report_campaign_id.b83941e728": [], "test.apple_search_ads_source.not_null_stg_apple_search_ads__campaign_report_date_day.c8dc10a6f3": [], "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__campaign_report_campaign_id__date_day.bad41b0481": [], "test.apple_search_ads_source.not_null_stg_apple_search_ads__keyword_history_modified_at.42fde5a287": [], "test.apple_search_ads_source.not_null_stg_apple_search_ads__keyword_history_keyword_id.889f83cfd2": [], "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__keyword_history_keyword_id__modified_at.7b06162d24": [], "test.apple_search_ads_source.not_null_stg_apple_search_ads__keyword_report_keyword_id.501725b09e": [], "test.apple_search_ads_source.not_null_stg_apple_search_ads__keyword_report_date_day.16098db928": [], "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__keyword_report_keyword_id__date_day.9f0099cff8": [], "test.apple_search_ads_source.not_null_stg_apple_search_ads__organization_organization_id.b013ce33cb": [], "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__organization_organization_id.8647048f7a": [], "test.apple_search_ads_source.not_null_stg_apple_search_ads__search_term_report__fivetran_id.aa430d1dad": [], "test.apple_search_ads_source.not_null_stg_apple_search_ads__search_term_report_date_day.fd93df3302": [], "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__search_term_report__fivetran_id__date_day.aad2a48344": [], "source.apple_search_ads_source.apple_search_ads.ad_group_history": ["model.apple_search_ads_source.stg_apple_search_ads__ad_group_history_tmp"], "source.apple_search_ads_source.apple_search_ads.ad_group_report": ["model.apple_search_ads_source.stg_apple_search_ads__ad_group_report_tmp"], "source.apple_search_ads_source.apple_search_ads.ad_history": ["model.apple_search_ads_source.stg_apple_search_ads__ad_history_tmp"], "source.apple_search_ads_source.apple_search_ads.ad_level_report": ["model.apple_search_ads_source.stg_apple_search_ads__ad_report_tmp"], "source.apple_search_ads_source.apple_search_ads.campaign_history": ["model.apple_search_ads_source.stg_apple_search_ads__campaign_history_tmp"], "source.apple_search_ads_source.apple_search_ads.campaign_report": ["model.apple_search_ads_source.stg_apple_search_ads__campaign_report_tmp"], "source.apple_search_ads_source.apple_search_ads.keyword_history": ["model.apple_search_ads_source.stg_apple_search_ads__keyword_history_tmp"], "source.apple_search_ads_source.apple_search_ads.keyword_report": ["model.apple_search_ads_source.stg_apple_search_ads__keyword_report_tmp"], "source.apple_search_ads_source.apple_search_ads.organization": ["model.apple_search_ads_source.stg_apple_search_ads__organization_tmp"], "source.apple_search_ads_source.apple_search_ads.search_term_report": ["model.apple_search_ads_source.stg_apple_search_ads__search_term_report_tmp"]}} \ No newline at end of file diff --git a/docs/run_results.json b/docs/run_results.json index d513b82..0ce3b0e 100644 --- a/docs/run_results.json +++ b/docs/run_results.json @@ -1 +1 @@ -{"metadata": {"dbt_schema_version": "https://schemas.getdbt.com/dbt/run-results/v4.json", "dbt_version": "1.0.4", "generated_at": "2022-08-26T21:15:22.160571Z", "invocation_id": "367dbfac-ed32-4d44-bb84-cf72665daa06", "env": {}}, "results": [{"status": "success", "timing": [{"name": "compile", "started_at": "2022-08-26T21:15:21.036024Z", "completed_at": "2022-08-26T21:15:21.052453Z"}, {"name": "execute", "started_at": "2022-08-26T21:15:21.055912Z", "completed_at": "2022-08-26T21:15:21.055927Z"}], "thread_id": "Thread-1", "execution_time": 0.022156953811645508, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.apple_search_ads_source.stg_apple_search_ads__ad_group_history_tmp"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-08-26T21:15:21.046431Z", "completed_at": "2022-08-26T21:15:21.056565Z"}, {"name": "execute", "started_at": "2022-08-26T21:15:21.058026Z", "completed_at": "2022-08-26T21:15:21.058032Z"}], "thread_id": "Thread-3", "execution_time": 0.023003101348876953, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.apple_search_ads_source.stg_apple_search_ads__ad_history_tmp"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-08-26T21:15:21.046286Z", "completed_at": "2022-08-26T21:15:21.057180Z"}, {"name": "execute", "started_at": "2022-08-26T21:15:21.058122Z", "completed_at": "2022-08-26T21:15:21.058126Z"}], "thread_id": "Thread-2", "execution_time": 0.023482084274291992, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.apple_search_ads_source.stg_apple_search_ads__ad_group_report_tmp"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-08-26T21:15:21.046581Z", "completed_at": "2022-08-26T21:15:21.057439Z"}, {"name": "execute", "started_at": "2022-08-26T21:15:21.058355Z", "completed_at": "2022-08-26T21:15:21.058364Z"}], "thread_id": "Thread-4", "execution_time": 0.025717973709106445, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.apple_search_ads_source.stg_apple_search_ads__ad_report_tmp"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-08-26T21:15:21.058243Z", "completed_at": "2022-08-26T21:15:21.063159Z"}, {"name": "execute", "started_at": "2022-08-26T21:15:21.066375Z", "completed_at": "2022-08-26T21:15:21.066383Z"}], "thread_id": "Thread-1", "execution_time": 0.01679706573486328, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.apple_search_ads_source.stg_apple_search_ads__campaign_history_tmp"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-08-26T21:15:21.063531Z", "completed_at": "2022-08-26T21:15:21.074730Z"}, {"name": "execute", "started_at": "2022-08-26T21:15:21.075707Z", "completed_at": "2022-08-26T21:15:21.075721Z"}], "thread_id": "Thread-3", "execution_time": 0.013870716094970703, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.apple_search_ads_source.stg_apple_search_ads__campaign_report_tmp"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-08-26T21:15:21.063869Z", "completed_at": "2022-08-26T21:15:21.075242Z"}, {"name": "execute", "started_at": "2022-08-26T21:15:21.076453Z", "completed_at": "2022-08-26T21:15:21.076458Z"}], "thread_id": "Thread-4", "execution_time": 0.017881155014038086, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.apple_search_ads_source.stg_apple_search_ads__keyword_report_tmp"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-08-26T21:15:21.063770Z", "completed_at": "2022-08-26T21:15:21.075315Z"}, {"name": "execute", "started_at": "2022-08-26T21:15:21.076611Z", "completed_at": "2022-08-26T21:15:21.076618Z"}], "thread_id": "Thread-2", "execution_time": 0.01840806007385254, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.apple_search_ads_source.stg_apple_search_ads__keyword_history_tmp"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-08-26T21:15:21.076124Z", "completed_at": "2022-08-26T21:15:21.081833Z"}, {"name": "execute", "started_at": "2022-08-26T21:15:21.082817Z", "completed_at": "2022-08-26T21:15:21.082823Z"}], "thread_id": "Thread-1", "execution_time": 0.012159109115600586, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.apple_search_ads_source.stg_apple_search_ads__organization_tmp"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-08-26T21:15:21.082663Z", "completed_at": "2022-08-26T21:15:21.088786Z"}, {"name": "execute", "started_at": "2022-08-26T21:15:21.090921Z", "completed_at": "2022-08-26T21:15:21.090929Z"}], "thread_id": "Thread-3", "execution_time": 0.010057210922241211, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.apple_search_ads_source.stg_apple_search_ads__search_term_report_tmp"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-08-26T21:15:21.086759Z", "completed_at": "2022-08-26T21:15:21.090172Z"}, {"name": "execute", "started_at": "2022-08-26T21:15:21.091085Z", "completed_at": "2022-08-26T21:15:21.091088Z"}], "thread_id": "Thread-4", "execution_time": 0.009474039077758789, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.apple_search_ads_integration_tests.ad_group_history_data"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-08-26T21:15:21.087176Z", "completed_at": "2022-08-26T21:15:21.090637Z"}, {"name": "execute", "started_at": "2022-08-26T21:15:21.091545Z", "completed_at": "2022-08-26T21:15:21.091551Z"}], "thread_id": "Thread-2", "execution_time": 0.010821104049682617, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.apple_search_ads_integration_tests.ad_group_report_data"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-08-26T21:15:21.091193Z", "completed_at": "2022-08-26T21:15:21.093604Z"}, {"name": "execute", "started_at": "2022-08-26T21:15:21.094528Z", "completed_at": "2022-08-26T21:15:21.094533Z"}], "thread_id": "Thread-1", "execution_time": 0.004720926284790039, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.apple_search_ads_integration_tests.ad_history_data"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-08-26T21:15:21.094602Z", "completed_at": "2022-08-26T21:15:21.097300Z"}, {"name": "execute", "started_at": "2022-08-26T21:15:21.099558Z", "completed_at": "2022-08-26T21:15:21.099563Z"}], "thread_id": "Thread-3", "execution_time": 0.006367921829223633, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.apple_search_ads_integration_tests.ad_report_data"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-08-26T21:15:21.094801Z", "completed_at": "2022-08-26T21:15:21.099025Z"}, {"name": "execute", "started_at": "2022-08-26T21:15:21.099821Z", "completed_at": "2022-08-26T21:15:21.099827Z"}], "thread_id": "Thread-4", "execution_time": 0.006226062774658203, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.apple_search_ads_integration_tests.campaign_history_data"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-08-26T21:15:21.096202Z", "completed_at": "2022-08-26T21:15:21.099344Z"}, {"name": "execute", "started_at": "2022-08-26T21:15:21.100141Z", "completed_at": "2022-08-26T21:15:21.100144Z"}], "thread_id": "Thread-2", "execution_time": 0.0071909427642822266, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.apple_search_ads_integration_tests.campaign_report_data"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-08-26T21:15:21.099912Z", "completed_at": "2022-08-26T21:15:21.101817Z"}, {"name": "execute", "started_at": "2022-08-26T21:15:21.102647Z", "completed_at": "2022-08-26T21:15:21.102651Z"}], "thread_id": "Thread-1", "execution_time": 0.0038967132568359375, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.apple_search_ads_integration_tests.keyword_history_data"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-08-26T21:15:21.102737Z", "completed_at": "2022-08-26T21:15:21.105429Z"}, {"name": "execute", "started_at": "2022-08-26T21:15:21.106952Z", "completed_at": "2022-08-26T21:15:21.106956Z"}], "thread_id": "Thread-3", "execution_time": 0.005404233932495117, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.apple_search_ads_integration_tests.keyword_report_data"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-08-26T21:15:21.102876Z", "completed_at": "2022-08-26T21:15:21.106432Z"}, {"name": "execute", "started_at": "2022-08-26T21:15:21.107100Z", "completed_at": "2022-08-26T21:15:21.107103Z"}], "thread_id": "Thread-4", "execution_time": 0.005342006683349609, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.apple_search_ads_integration_tests.organization_data"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-08-26T21:15:21.104230Z", "completed_at": "2022-08-26T21:15:21.106747Z"}, {"name": "execute", "started_at": "2022-08-26T21:15:21.107374Z", "completed_at": "2022-08-26T21:15:21.107377Z"}], "thread_id": "Thread-2", "execution_time": 0.010988235473632812, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.apple_search_ads_integration_tests.search_term_report_data"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-08-26T21:15:21.118697Z", "completed_at": "2022-08-26T21:15:21.384570Z"}, {"name": "execute", "started_at": "2022-08-26T21:15:21.384924Z", "completed_at": "2022-08-26T21:15:21.384932Z"}], "thread_id": "Thread-2", "execution_time": 0.2925848960876465, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.apple_search_ads_source.stg_apple_search_ads__ad_report"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-08-26T21:15:21.114500Z", "completed_at": "2022-08-26T21:15:21.386419Z"}, {"name": "execute", "started_at": "2022-08-26T21:15:21.386701Z", "completed_at": "2022-08-26T21:15:21.386705Z"}], "thread_id": "Thread-3", "execution_time": 0.29961609840393066, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.apple_search_ads_source.stg_apple_search_ads__ad_history"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-08-26T21:15:21.114640Z", "completed_at": "2022-08-26T21:15:21.388456Z"}, {"name": "execute", "started_at": "2022-08-26T21:15:21.388682Z", "completed_at": "2022-08-26T21:15:21.388687Z"}], "thread_id": "Thread-4", "execution_time": 0.29970574378967285, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.apple_search_ads_source.stg_apple_search_ads__ad_group_report"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-08-26T21:15:21.107174Z", "completed_at": "2022-08-26T21:15:21.388831Z"}, {"name": "execute", "started_at": "2022-08-26T21:15:21.389011Z", "completed_at": "2022-08-26T21:15:21.389015Z"}], "thread_id": "Thread-1", "execution_time": 0.3181643486022949, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.apple_search_ads_source.stg_apple_search_ads__ad_group_history"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-08-26T21:15:21.415022Z", "completed_at": "2022-08-26T21:15:21.698733Z"}, {"name": "execute", "started_at": "2022-08-26T21:15:21.699178Z", "completed_at": "2022-08-26T21:15:21.699194Z"}], "thread_id": "Thread-4", "execution_time": 0.30984020233154297, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.apple_search_ads_source.stg_apple_search_ads__keyword_report"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-08-26T21:15:21.414847Z", "completed_at": "2022-08-26T21:15:21.710902Z"}, {"name": "execute", "started_at": "2022-08-26T21:15:21.712706Z", "completed_at": "2022-08-26T21:15:21.712713Z"}], "thread_id": "Thread-3", "execution_time": 0.3239870071411133, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.apple_search_ads_source.stg_apple_search_ads__campaign_report"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-08-26T21:15:21.425820Z", "completed_at": "2022-08-26T21:15:21.708682Z"}, {"name": "execute", "started_at": "2022-08-26T21:15:21.711151Z", "completed_at": "2022-08-26T21:15:21.711160Z"}], "thread_id": "Thread-1", "execution_time": 0.312838077545166, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.apple_search_ads_source.stg_apple_search_ads__keyword_history"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-08-26T21:15:21.408030Z", "completed_at": "2022-08-26T21:15:21.713375Z"}, {"name": "execute", "started_at": "2022-08-26T21:15:21.713667Z", "completed_at": "2022-08-26T21:15:21.713674Z"}], "thread_id": "Thread-2", "execution_time": 0.33122992515563965, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.apple_search_ads_source.stg_apple_search_ads__campaign_history"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-08-26T21:15:21.744345Z", "completed_at": "2022-08-26T21:15:21.766275Z"}, {"name": "execute", "started_at": "2022-08-26T21:15:21.766456Z", "completed_at": "2022-08-26T21:15:21.766463Z"}], "thread_id": "Thread-2", "execution_time": 0.02306509017944336, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_report_ad_group_id.a397755e9f"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-08-26T21:15:21.744225Z", "completed_at": "2022-08-26T21:15:21.766902Z"}, {"name": "execute", "started_at": "2022-08-26T21:15:21.767428Z", "completed_at": "2022-08-26T21:15:21.767436Z"}], "thread_id": "Thread-1", "execution_time": 0.024412870407104492, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__ad_report_ad_id__date_day__ad_group_id.0d8d23c516"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-08-26T21:15:21.767538Z", "completed_at": "2022-08-26T21:15:21.773922Z"}, {"name": "execute", "started_at": "2022-08-26T21:15:21.774263Z", "completed_at": "2022-08-26T21:15:21.774270Z"}], "thread_id": "Thread-2", "execution_time": 0.00747990608215332, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_report_ad_id.d08e760c58"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-08-26T21:15:21.771202Z", "completed_at": "2022-08-26T21:15:21.774949Z"}, {"name": "execute", "started_at": "2022-08-26T21:15:21.775348Z", "completed_at": "2022-08-26T21:15:21.775353Z"}], "thread_id": "Thread-1", "execution_time": 0.007537841796875, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_report_date_day.e6252346d8"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-08-26T21:15:21.775273Z", "completed_at": "2022-08-26T21:15:21.779086Z"}, {"name": "execute", "started_at": "2022-08-26T21:15:21.782967Z", "completed_at": "2022-08-26T21:15:21.782980Z"}], "thread_id": "Thread-2", "execution_time": 0.008731842041015625, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__ad_history_ad_id__modified_at.38599b8cba"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-08-26T21:15:21.779165Z", "completed_at": "2022-08-26T21:15:21.784220Z"}, {"name": "execute", "started_at": "2022-08-26T21:15:21.858326Z", "completed_at": "2022-08-26T21:15:21.858342Z"}], "thread_id": "Thread-1", "execution_time": 0.07993793487548828, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_history_ad_id.4ad3bde32a"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-08-26T21:15:21.784305Z", "completed_at": "2022-08-26T21:15:21.863345Z"}, {"name": "execute", "started_at": "2022-08-26T21:15:21.864089Z", "completed_at": "2022-08-26T21:15:21.864105Z"}], "thread_id": "Thread-2", "execution_time": 0.08045411109924316, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_history_modified_at.2eea7e006d"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-08-26T21:15:21.859465Z", "completed_at": "2022-08-26T21:15:21.868610Z"}, {"name": "execute", "started_at": "2022-08-26T21:15:21.869068Z", "completed_at": "2022-08-26T21:15:21.869080Z"}], "thread_id": "Thread-1", "execution_time": 0.010144948959350586, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__ad_group_report_ad_group_id__date_day.a0fcc4e33c"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-08-26T21:15:21.864953Z", "completed_at": "2022-08-26T21:15:21.869570Z"}, {"name": "execute", "started_at": "2022-08-26T21:15:21.870235Z", "completed_at": "2022-08-26T21:15:21.870241Z"}], "thread_id": "Thread-2", "execution_time": 0.005937814712524414, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_group_report_ad_group_id.a115f9cfc1"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-08-26T21:15:21.870384Z", "completed_at": "2022-08-26T21:15:21.880862Z"}, {"name": "execute", "started_at": "2022-08-26T21:15:21.883644Z", "completed_at": "2022-08-26T21:15:21.883655Z"}], "thread_id": "Thread-1", "execution_time": 0.014132022857666016, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_group_report_date_day.4dfd46a43b"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-08-26T21:15:21.874817Z", "completed_at": "2022-08-26T21:15:21.884240Z"}, {"name": "execute", "started_at": "2022-08-26T21:15:21.885156Z", "completed_at": "2022-08-26T21:15:21.885166Z"}], "thread_id": "Thread-2", "execution_time": 0.014433860778808594, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__ad_group_history_ad_group_id__modified_at.84af14c83b"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-08-26T21:15:21.884930Z", "completed_at": "2022-08-26T21:15:21.889081Z"}, {"name": "execute", "started_at": "2022-08-26T21:15:21.893306Z", "completed_at": "2022-08-26T21:15:21.893325Z"}], "thread_id": "Thread-1", "execution_time": 0.009267091751098633, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_group_history_ad_group_id.dc128eecb7"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-08-26T21:15:21.889182Z", "completed_at": "2022-08-26T21:15:21.894528Z"}, {"name": "execute", "started_at": "2022-08-26T21:15:21.898355Z", "completed_at": "2022-08-26T21:15:21.898370Z"}], "thread_id": "Thread-2", "execution_time": 0.009903907775878906, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_group_history_modified_at.e5d65fa28f"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-08-26T21:15:21.894695Z", "completed_at": "2022-08-26T21:15:21.899164Z"}, {"name": "execute", "started_at": "2022-08-26T21:15:21.899508Z", "completed_at": "2022-08-26T21:15:21.899514Z"}], "thread_id": "Thread-1", "execution_time": 0.008626222610473633, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__keyword_report_keyword_id__date_day.9f0099cff8"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-08-26T21:15:21.899418Z", "completed_at": "2022-08-26T21:15:21.906418Z"}, {"name": "execute", "started_at": "2022-08-26T21:15:21.906666Z", "completed_at": "2022-08-26T21:15:21.906674Z"}], "thread_id": "Thread-2", "execution_time": 0.007995128631591797, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__keyword_report_date_day.16098db928"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-08-26T21:15:21.903487Z", "completed_at": "2022-08-26T21:15:21.906786Z"}, {"name": "execute", "started_at": "2022-08-26T21:15:21.907399Z", "completed_at": "2022-08-26T21:15:21.907405Z"}], "thread_id": "Thread-1", "execution_time": 0.004514932632446289, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__keyword_report_keyword_id.501725b09e"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-08-26T21:15:21.908025Z", "completed_at": "2022-08-26T21:15:21.914448Z"}, {"name": "execute", "started_at": "2022-08-26T21:15:21.914739Z", "completed_at": "2022-08-26T21:15:21.914748Z"}], "thread_id": "Thread-2", "execution_time": 0.0074939727783203125, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__campaign_report_campaign_id__date_day.bad41b0481"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-08-26T21:15:21.911684Z", "completed_at": "2022-08-26T21:15:21.915104Z"}, {"name": "execute", "started_at": "2022-08-26T21:15:21.915774Z", "completed_at": "2022-08-26T21:15:21.915780Z"}], "thread_id": "Thread-1", "execution_time": 0.007970094680786133, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__campaign_report_campaign_id.b83941e728"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-08-26T21:15:21.916183Z", "completed_at": "2022-08-26T21:15:21.923566Z"}, {"name": "execute", "started_at": "2022-08-26T21:15:21.924079Z", "completed_at": "2022-08-26T21:15:21.924089Z"}], "thread_id": "Thread-2", "execution_time": 0.008873939514160156, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__campaign_report_date_day.c8dc10a6f3"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-08-26T21:15:21.920204Z", "completed_at": "2022-08-26T21:15:21.923938Z"}, {"name": "execute", "started_at": "2022-08-26T21:15:21.924593Z", "completed_at": "2022-08-26T21:15:21.924601Z"}], "thread_id": "Thread-1", "execution_time": 0.005074262619018555, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__keyword_history_keyword_id__modified_at.7b06162d24"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-08-26T21:15:21.925591Z", "completed_at": "2022-08-26T21:15:21.931075Z"}, {"name": "execute", "started_at": "2022-08-26T21:15:21.931355Z", "completed_at": "2022-08-26T21:15:21.931366Z"}], "thread_id": "Thread-2", "execution_time": 0.006554841995239258, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__keyword_history_keyword_id.889f83cfd2"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-08-26T21:15:21.928401Z", "completed_at": "2022-08-26T21:15:21.932017Z"}, {"name": "execute", "started_at": "2022-08-26T21:15:21.932876Z", "completed_at": "2022-08-26T21:15:21.932887Z"}], "thread_id": "Thread-1", "execution_time": 0.007824182510375977, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__keyword_history_modified_at.42fde5a287"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-08-26T21:15:21.933047Z", "completed_at": "2022-08-26T21:15:21.939663Z"}, {"name": "execute", "started_at": "2022-08-26T21:15:21.942714Z", "completed_at": "2022-08-26T21:15:21.942725Z"}], "thread_id": "Thread-2", "execution_time": 0.01082301139831543, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__campaign_history_campaign_id__modified_at.317f970af9"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-08-26T21:15:21.939587Z", "completed_at": "2022-08-26T21:15:21.946367Z"}, {"name": "execute", "started_at": "2022-08-26T21:15:21.947070Z", "completed_at": "2022-08-26T21:15:21.947080Z"}], "thread_id": "Thread-1", "execution_time": 0.008352994918823242, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__campaign_history_campaign_id.3f0f7502b8"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-08-26T21:15:21.943720Z", "completed_at": "2022-08-26T21:15:21.947186Z"}, {"name": "execute", "started_at": "2022-08-26T21:15:21.947980Z", "completed_at": "2022-08-26T21:15:21.947987Z"}], "thread_id": "Thread-2", "execution_time": 0.004889726638793945, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__campaign_history_modified_at.f34a7a97c9"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-08-26T21:15:21.725266Z", "completed_at": "2022-08-26T21:15:21.997294Z"}, {"name": "execute", "started_at": "2022-08-26T21:15:22.001243Z", "completed_at": "2022-08-26T21:15:22.001256Z"}], "thread_id": "Thread-4", "execution_time": 0.3024568557739258, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.apple_search_ads_source.stg_apple_search_ads__organization"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-08-26T21:15:21.744086Z", "completed_at": "2022-08-26T21:15:22.004311Z"}, {"name": "execute", "started_at": "2022-08-26T21:15:22.004537Z", "completed_at": "2022-08-26T21:15:22.004546Z"}], "thread_id": "Thread-3", "execution_time": 0.2843902111053467, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.apple_search_ads_source.stg_apple_search_ads__search_term_report"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-08-26T21:15:22.029291Z", "completed_at": "2022-08-26T21:15:22.051624Z"}, {"name": "execute", "started_at": "2022-08-26T21:15:22.053152Z", "completed_at": "2022-08-26T21:15:22.053165Z"}], "thread_id": "Thread-1", "execution_time": 0.02566385269165039, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.apple_search_ads.apple_search_ads__ad_group_report"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-08-26T21:15:22.037349Z", "completed_at": "2022-08-26T21:15:22.053045Z"}, {"name": "execute", "started_at": "2022-08-26T21:15:22.054027Z", "completed_at": "2022-08-26T21:15:22.054034Z"}], "thread_id": "Thread-4", "execution_time": 0.02582693099975586, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.apple_search_ads.apple_search_ads__campaign_report"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-08-26T21:15:22.037267Z", "completed_at": "2022-08-26T21:15:22.053246Z"}, {"name": "execute", "started_at": "2022-08-26T21:15:22.054540Z", "completed_at": "2022-08-26T21:15:22.054545Z"}], "thread_id": "Thread-2", "execution_time": 0.026501893997192383, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.apple_search_ads.apple_search_ads__ad_report"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-08-26T21:15:22.037421Z", "completed_at": "2022-08-26T21:15:22.053820Z"}, {"name": "execute", "started_at": "2022-08-26T21:15:22.055061Z", "completed_at": "2022-08-26T21:15:22.055067Z"}], "thread_id": "Thread-3", "execution_time": 0.026559114456176758, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.apple_search_ads.apple_search_ads__keyword_report"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-08-26T21:15:22.056093Z", "completed_at": "2022-08-26T21:15:22.061343Z"}, {"name": "execute", "started_at": "2022-08-26T21:15:22.071829Z", "completed_at": "2022-08-26T21:15:22.071841Z"}], "thread_id": "Thread-1", "execution_time": 0.01737380027770996, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.apple_search_ads.apple_search_ads__organization_report"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-08-26T21:15:22.060777Z", "completed_at": "2022-08-26T21:15:22.071933Z"}, {"name": "execute", "started_at": "2022-08-26T21:15:22.073201Z", "completed_at": "2022-08-26T21:15:22.073211Z"}], "thread_id": "Thread-4", "execution_time": 0.017902851104736328, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.apple_search_ads.apple_search_ads__search_term_report"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-08-26T21:15:22.061150Z", "completed_at": "2022-08-26T21:15:22.072380Z"}, {"name": "execute", "started_at": "2022-08-26T21:15:22.073701Z", "completed_at": "2022-08-26T21:15:22.073706Z"}], "thread_id": "Thread-2", "execution_time": 0.017917871475219727, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__organization_organization_id.8647048f7a"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-08-26T21:15:22.065683Z", "completed_at": "2022-08-26T21:15:22.072755Z"}, {"name": "execute", "started_at": "2022-08-26T21:15:22.074044Z", "completed_at": "2022-08-26T21:15:22.074048Z"}], "thread_id": "Thread-3", "execution_time": 0.014490842819213867, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__search_term_report__fivetran_id__date_day.aad2a48344"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-08-26T21:15:22.074621Z", "completed_at": "2022-08-26T21:15:22.078505Z"}, {"name": "execute", "started_at": "2022-08-26T21:15:22.088483Z", "completed_at": "2022-08-26T21:15:22.088494Z"}], "thread_id": "Thread-1", "execution_time": 0.015773773193359375, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__organization_organization_id.b013ce33cb"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-08-26T21:15:22.078373Z", "completed_at": "2022-08-26T21:15:22.088759Z"}, {"name": "execute", "started_at": "2022-08-26T21:15:22.089681Z", "completed_at": "2022-08-26T21:15:22.089685Z"}], "thread_id": "Thread-4", "execution_time": 0.014907121658325195, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__search_term_report__fivetran_id.aa430d1dad"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-08-26T21:15:22.078574Z", "completed_at": "2022-08-26T21:15:22.088948Z"}, {"name": "execute", "started_at": "2022-08-26T21:15:22.089760Z", "completed_at": "2022-08-26T21:15:22.089763Z"}], "thread_id": "Thread-2", "execution_time": 0.012369871139526367, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__search_term_report_date_day.fd93df3302"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-08-26T21:15:22.082093Z", "completed_at": "2022-08-26T21:15:22.089603Z"}, {"name": "execute", "started_at": "2022-08-26T21:15:22.090440Z", "completed_at": "2022-08-26T21:15:22.090444Z"}], "thread_id": "Thread-3", "execution_time": 0.01621079444885254, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads.dbt_utils_unique_combination_of_columns_apple_search_ads__ad_group_report_organization_id__campaign_id__ad_group_id__date_day.19d180bab9"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-08-26T21:15:22.091170Z", "completed_at": "2022-08-26T21:15:22.098494Z"}, {"name": "execute", "started_at": "2022-08-26T21:15:22.101992Z", "completed_at": "2022-08-26T21:15:22.102008Z"}], "thread_id": "Thread-1", "execution_time": 0.012829065322875977, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads.not_null_apple_search_ads__ad_group_report_ad_group_id.60febec6b5"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-08-26T21:15:22.094087Z", "completed_at": "2022-08-26T21:15:22.102125Z"}, {"name": "execute", "started_at": "2022-08-26T21:15:22.106907Z", "completed_at": "2022-08-26T21:15:22.106914Z"}], "thread_id": "Thread-2", "execution_time": 0.016668081283569336, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads.dbt_utils_unique_combination_of_columns_apple_search_ads__campaign_report_organization_id__campaign_id__date_day.647e56213f"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-08-26T21:15:22.098925Z", "completed_at": "2022-08-26T21:15:22.106548Z"}, {"name": "execute", "started_at": "2022-08-26T21:15:22.107652Z", "completed_at": "2022-08-26T21:15:22.107656Z"}], "thread_id": "Thread-4", "execution_time": 0.01346898078918457, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads.not_null_apple_search_ads__ad_group_report_date_day.e6ffb30b3c"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-08-26T21:15:22.102260Z", "completed_at": "2022-08-26T21:15:22.107577Z"}, {"name": "execute", "started_at": "2022-08-26T21:15:22.108360Z", "completed_at": "2022-08-26T21:15:22.108364Z"}], "thread_id": "Thread-3", "execution_time": 0.01257181167602539, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads.not_null_apple_search_ads__campaign_report_campaign_id.e26ed1e146"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-08-26T21:15:22.108163Z", "completed_at": "2022-08-26T21:15:22.111848Z"}, {"name": "execute", "started_at": "2022-08-26T21:15:22.116272Z", "completed_at": "2022-08-26T21:15:22.116283Z"}], "thread_id": "Thread-1", "execution_time": 0.011778116226196289, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads.not_null_apple_search_ads__campaign_report_date_day.35652b8d1a"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-08-26T21:15:22.111541Z", "completed_at": "2022-08-26T21:15:22.118813Z"}, {"name": "execute", "started_at": "2022-08-26T21:15:22.122030Z", "completed_at": "2022-08-26T21:15:22.122038Z"}], "thread_id": "Thread-2", "execution_time": 0.014382123947143555, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads.dbt_utils_unique_combination_of_columns_apple_search_ads__ad_report_organization_id__campaign_id__ad_group_id__ad_id__date_day.54e27817a1"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-08-26T21:15:22.116032Z", "completed_at": "2022-08-26T21:15:22.121787Z"}, {"name": "execute", "started_at": "2022-08-26T21:15:22.122948Z", "completed_at": "2022-08-26T21:15:22.122953Z"}], "thread_id": "Thread-4", "execution_time": 0.012099027633666992, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads.not_null_apple_search_ads__ad_report_ad_id.0ab2c5075c"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-08-26T21:15:22.118736Z", "completed_at": "2022-08-26T21:15:22.122869Z"}, {"name": "execute", "started_at": "2022-08-26T21:15:22.127140Z", "completed_at": "2022-08-26T21:15:22.127148Z"}], "thread_id": "Thread-3", "execution_time": 0.011907100677490234, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads.not_null_apple_search_ads__ad_report_date_day.b86c049e17"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-08-26T21:15:22.123211Z", "completed_at": "2022-08-26T21:15:22.127900Z"}, {"name": "execute", "started_at": "2022-08-26T21:15:22.132077Z", "completed_at": "2022-08-26T21:15:22.132086Z"}], "thread_id": "Thread-1", "execution_time": 0.013204097747802734, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads.dbt_utils_unique_combination_of_columns_apple_search_ads__keyword_report_organization_id__campaign_id__ad_group_id__keyword_id__date_day.78fb033a13"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-08-26T21:15:22.127839Z", "completed_at": "2022-08-26T21:15:22.135119Z"}, {"name": "execute", "started_at": "2022-08-26T21:15:22.138867Z", "completed_at": "2022-08-26T21:15:22.138875Z"}], "thread_id": "Thread-2", "execution_time": 0.015666961669921875, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads.not_null_apple_search_ads__keyword_report_date_day.3dec8d0e82"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-08-26T21:15:22.131901Z", "completed_at": "2022-08-26T21:15:22.138947Z"}, {"name": "execute", "started_at": "2022-08-26T21:15:22.139866Z", "completed_at": "2022-08-26T21:15:22.139870Z"}], "thread_id": "Thread-4", "execution_time": 0.012755155563354492, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads.not_null_apple_search_ads__keyword_report_keyword_id.ea493710db"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-08-26T21:15:22.135502Z", "completed_at": "2022-08-26T21:15:22.139628Z"}, {"name": "execute", "started_at": "2022-08-26T21:15:22.143157Z", "completed_at": "2022-08-26T21:15:22.143171Z"}], "thread_id": "Thread-3", "execution_time": 0.012183904647827148, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads.dbt_utils_unique_combination_of_columns_apple_search_ads__organization_report_organization_id__date_day.8bc84fccc3"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-08-26T21:15:22.139965Z", "completed_at": "2022-08-26T21:15:22.144547Z"}, {"name": "execute", "started_at": "2022-08-26T21:15:22.147783Z", "completed_at": "2022-08-26T21:15:22.147789Z"}], "thread_id": "Thread-1", "execution_time": 0.011721134185791016, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads.not_null_apple_search_ads__organization_report_date_day.5784fed523"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-08-26T21:15:22.144076Z", "completed_at": "2022-08-26T21:15:22.150403Z"}, {"name": "execute", "started_at": "2022-08-26T21:15:22.153868Z", "completed_at": "2022-08-26T21:15:22.153877Z"}], "thread_id": "Thread-2", "execution_time": 0.01438283920288086, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads.not_null_apple_search_ads__organization_report_organization_id.b6cf7d69f8"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-08-26T21:15:22.147613Z", "completed_at": "2022-08-26T21:15:22.153700Z"}, {"name": "execute", "started_at": "2022-08-26T21:15:22.154774Z", "completed_at": "2022-08-26T21:15:22.154778Z"}], "thread_id": "Thread-4", "execution_time": 0.011024951934814453, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads.dbt_utils_unique_combination_of_columns_apple_search_ads__search_term_report_search_term_text__date_day.e60fe79ec4"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-08-26T21:15:22.150562Z", "completed_at": "2022-08-26T21:15:22.154693Z"}, {"name": "execute", "started_at": "2022-08-26T21:15:22.158729Z", "completed_at": "2022-08-26T21:15:22.158737Z"}], "thread_id": "Thread-3", "execution_time": 0.011789798736572266, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads.not_null_apple_search_ads__search_term_report_date_day.1bc3b0d57c"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-08-26T21:15:22.154913Z", "completed_at": "2022-08-26T21:15:22.159331Z"}, {"name": "execute", "started_at": "2022-08-26T21:15:22.159508Z", "completed_at": "2022-08-26T21:15:22.159513Z"}], "thread_id": "Thread-1", "execution_time": 0.005538225173950195, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads.not_null_apple_search_ads__search_term_report_search_term_text.aecc7447f7"}], "elapsed_time": 1.8295490741729736, "args": {"write_json": true, "use_colors": true, "printer_width": 80, "version_check": true, "partial_parse": true, "static_parser": true, "profiles_dir": "/Users/joseph.markiewicz/.dbt", "send_anonymous_usage_stats": true, "event_buffer_size": 100000, "target": "postgres", "compile": true, "which": "generate", "rpc_method": "docs.generate", "indirect_selection": "eager"}} \ No newline at end of file +{"metadata": {"dbt_schema_version": "https://schemas.getdbt.com/dbt/run-results/v4.json", "dbt_version": "1.3.0", "generated_at": "2022-10-25T20:13:54.693257Z", "invocation_id": "2191920f-7f18-410e-bf49-1ac3da176caa", "env": {}}, "results": [{"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:53.395232Z", "completed_at": "2022-10-25T20:13:53.415689Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:53.416057Z", "completed_at": "2022-10-25T20:13:53.416079Z"}], "thread_id": "Thread-2 (worker)", "execution_time": 0.02472710609436035, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.apple_search_ads_source.stg_apple_search_ads__ad_group_report_tmp"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:53.395369Z", "completed_at": "2022-10-25T20:13:53.416165Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:53.417241Z", "completed_at": "2022-10-25T20:13:53.417247Z"}], "thread_id": "Thread-3 (worker)", "execution_time": 0.025351762771606445, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.apple_search_ads_source.stg_apple_search_ads__ad_history_tmp"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:53.395014Z", "completed_at": "2022-10-25T20:13:53.416230Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:53.417397Z", "completed_at": "2022-10-25T20:13:53.417402Z"}], "thread_id": "Thread-1 (worker)", "execution_time": 0.02710890769958496, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.apple_search_ads_source.stg_apple_search_ads__ad_group_history_tmp"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:53.395496Z", "completed_at": "2022-10-25T20:13:53.416298Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:53.417482Z", "completed_at": "2022-10-25T20:13:53.417485Z"}], "thread_id": "Thread-4 (worker)", "execution_time": 0.02524089813232422, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.apple_search_ads_source.stg_apple_search_ads__ad_report_tmp"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:53.419342Z", "completed_at": "2022-10-25T20:13:53.423944Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:53.431735Z", "completed_at": "2022-10-25T20:13:53.431742Z"}], "thread_id": "Thread-2 (worker)", "execution_time": 0.01450490951538086, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.apple_search_ads_source.stg_apple_search_ads__campaign_history_tmp"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:53.423660Z", "completed_at": "2022-10-25T20:13:53.432202Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:53.433081Z", "completed_at": "2022-10-25T20:13:53.433085Z"}], "thread_id": "Thread-3 (worker)", "execution_time": 0.014067888259887695, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.apple_search_ads_source.stg_apple_search_ads__campaign_report_tmp"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:53.423780Z", "completed_at": "2022-10-25T20:13:53.432310Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:53.433154Z", "completed_at": "2022-10-25T20:13:53.433158Z"}], "thread_id": "Thread-1 (worker)", "execution_time": 0.014059066772460938, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.apple_search_ads_source.stg_apple_search_ads__keyword_history_tmp"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:53.423858Z", "completed_at": "2022-10-25T20:13:53.432444Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:53.433293Z", "completed_at": "2022-10-25T20:13:53.433296Z"}], "thread_id": "Thread-4 (worker)", "execution_time": 0.014140844345092773, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.apple_search_ads_source.stg_apple_search_ads__keyword_report_tmp"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:53.433900Z", "completed_at": "2022-10-25T20:13:53.437844Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:53.443358Z", "completed_at": "2022-10-25T20:13:53.443363Z"}], "thread_id": "Thread-2 (worker)", "execution_time": 0.011815786361694336, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.apple_search_ads_source.stg_apple_search_ads__organization_tmp"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:53.438038Z", "completed_at": "2022-10-25T20:13:53.444356Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:53.445111Z", "completed_at": "2022-10-25T20:13:53.445114Z"}], "thread_id": "Thread-1 (worker)", "execution_time": 0.008497953414916992, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.apple_search_ads_integration_tests.ad_group_history_data"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:53.438163Z", "completed_at": "2022-10-25T20:13:53.444722Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:53.445520Z", "completed_at": "2022-10-25T20:13:53.445523Z"}], "thread_id": "Thread-4 (worker)", "execution_time": 0.008589029312133789, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.apple_search_ads_integration_tests.ad_group_report_data"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:53.437976Z", "completed_at": "2022-10-25T20:13:53.444840Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:53.445811Z", "completed_at": "2022-10-25T20:13:53.445814Z"}], "thread_id": "Thread-3 (worker)", "execution_time": 0.009418964385986328, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.apple_search_ads_source.stg_apple_search_ads__search_term_report_tmp"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:53.446503Z", "completed_at": "2022-10-25T20:13:53.448427Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:53.449723Z", "completed_at": "2022-10-25T20:13:53.449727Z"}], "thread_id": "Thread-2 (worker)", "execution_time": 0.007122993469238281, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.apple_search_ads_integration_tests.ad_history_data"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:53.448541Z", "completed_at": "2022-10-25T20:13:53.450659Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:53.452811Z", "completed_at": "2022-10-25T20:13:53.452813Z"}], "thread_id": "Thread-1 (worker)", "execution_time": 0.006646871566772461, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.apple_search_ads_integration_tests.ad_report_data"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:53.448714Z", "completed_at": "2022-10-25T20:13:53.452460Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:53.453125Z", "completed_at": "2022-10-25T20:13:53.453128Z"}], "thread_id": "Thread-4 (worker)", "execution_time": 0.005719900131225586, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.apple_search_ads_integration_tests.campaign_history_data"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:53.449657Z", "completed_at": "2022-10-25T20:13:53.452579Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:53.453404Z", "completed_at": "2022-10-25T20:13:53.453407Z"}], "thread_id": "Thread-3 (worker)", "execution_time": 0.005730152130126953, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.apple_search_ads_integration_tests.campaign_report_data"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:53.454053Z", "completed_at": "2022-10-25T20:13:53.455838Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:53.457064Z", "completed_at": "2022-10-25T20:13:53.457068Z"}], "thread_id": "Thread-2 (worker)", "execution_time": 0.006033897399902344, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.apple_search_ads_integration_tests.keyword_history_data"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:53.455951Z", "completed_at": "2022-10-25T20:13:53.457979Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:53.459380Z", "completed_at": "2022-10-25T20:13:53.459383Z"}], "thread_id": "Thread-1 (worker)", "execution_time": 0.005639076232910156, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.apple_search_ads_integration_tests.keyword_report_data"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:53.456110Z", "completed_at": "2022-10-25T20:13:53.459064Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:53.459663Z", "completed_at": "2022-10-25T20:13:53.459665Z"}], "thread_id": "Thread-4 (worker)", "execution_time": 0.004783153533935547, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.apple_search_ads_integration_tests.organization_data"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:53.457007Z", "completed_at": "2022-10-25T20:13:53.459173Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:53.459925Z", "completed_at": "2022-10-25T20:13:53.459927Z"}], "thread_id": "Thread-3 (worker)", "execution_time": 0.004794120788574219, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.apple_search_ads_integration_tests.search_term_report_data"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:53.467407Z", "completed_at": "2022-10-25T20:13:53.817430Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:53.817901Z", "completed_at": "2022-10-25T20:13:53.817909Z"}], "thread_id": "Thread-3 (worker)", "execution_time": 0.35483694076538086, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.apple_search_ads_source.stg_apple_search_ads__ad_report"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:53.464213Z", "completed_at": "2022-10-25T20:13:53.817521Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:53.818117Z", "completed_at": "2022-10-25T20:13:53.818120Z"}], "thread_id": "Thread-1 (worker)", "execution_time": 0.358126163482666, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.apple_search_ads_source.stg_apple_search_ads__ad_history"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:53.464406Z", "completed_at": "2022-10-25T20:13:53.817675Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:53.818524Z", "completed_at": "2022-10-25T20:13:53.818527Z"}], "thread_id": "Thread-4 (worker)", "execution_time": 0.3560168743133545, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.apple_search_ads_source.stg_apple_search_ads__ad_group_history"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:53.460554Z", "completed_at": "2022-10-25T20:13:53.817745Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:53.818593Z", "completed_at": "2022-10-25T20:13:53.818596Z"}], "thread_id": "Thread-2 (worker)", "execution_time": 0.36006617546081543, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.apple_search_ads_source.stg_apple_search_ads__ad_group_report"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:53.823903Z", "completed_at": "2022-10-25T20:13:54.190527Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:54.191233Z", "completed_at": "2022-10-25T20:13:54.191242Z"}], "thread_id": "Thread-4 (worker)", "execution_time": 0.37120890617370605, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.apple_search_ads_source.stg_apple_search_ads__keyword_history"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:53.823986Z", "completed_at": "2022-10-25T20:13:54.190643Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:54.191327Z", "completed_at": "2022-10-25T20:13:54.191331Z"}], "thread_id": "Thread-2 (worker)", "execution_time": 0.37140893936157227, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.apple_search_ads_source.stg_apple_search_ads__keyword_report"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:53.821288Z", "completed_at": "2022-10-25T20:13:54.190729Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:54.191497Z", "completed_at": "2022-10-25T20:13:54.191500Z"}], "thread_id": "Thread-1 (worker)", "execution_time": 0.3723618984222412, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.apple_search_ads_source.stg_apple_search_ads__campaign_report"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:53.821095Z", "completed_at": "2022-10-25T20:13:54.191028Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:54.192392Z", "completed_at": "2022-10-25T20:13:54.192396Z"}], "thread_id": "Thread-3 (worker)", "execution_time": 0.3739299774169922, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.apple_search_ads_source.stg_apple_search_ads__campaign_history"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:54.195875Z", "completed_at": "2022-10-25T20:13:54.218506Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:54.218941Z", "completed_at": "2022-10-25T20:13:54.218948Z"}], "thread_id": "Thread-1 (worker)", "execution_time": 0.0245361328125, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__ad_report_ad_id__date_day__ad_group_id.0d8d23c516"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:54.201941Z", "completed_at": "2022-10-25T20:13:54.218686Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:54.219013Z", "completed_at": "2022-10-25T20:13:54.219015Z"}], "thread_id": "Thread-3 (worker)", "execution_time": 0.024479150772094727, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_report_ad_group_id.a397755e9f"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:54.221124Z", "completed_at": "2022-10-25T20:13:54.267637Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:54.267889Z", "completed_at": "2022-10-25T20:13:54.267896Z"}], "thread_id": "Thread-3 (worker)", "execution_time": 0.04759407043457031, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_report_date_day.e6252346d8"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:54.221053Z", "completed_at": "2022-10-25T20:13:54.282205Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:54.282338Z", "completed_at": "2022-10-25T20:13:54.282343Z"}], "thread_id": "Thread-1 (worker)", "execution_time": 0.062155961990356445, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_report_ad_id.d08e760c58"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:54.279287Z", "completed_at": "2022-10-25T20:13:54.284978Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:54.285166Z", "completed_at": "2022-10-25T20:13:54.285170Z"}], "thread_id": "Thread-3 (worker)", "execution_time": 0.008213996887207031, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__ad_history_ad_id__modified_at.38599b8cba"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:54.282923Z", "completed_at": "2022-10-25T20:13:54.285454Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:54.285951Z", "completed_at": "2022-10-25T20:13:54.285954Z"}], "thread_id": "Thread-1 (worker)", "execution_time": 0.003535032272338867, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_history_ad_id.4ad3bde32a"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:54.286330Z", "completed_at": "2022-10-25T20:13:54.291713Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:54.291857Z", "completed_at": "2022-10-25T20:13:54.291862Z"}], "thread_id": "Thread-3 (worker)", "execution_time": 0.006358146667480469, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_history_modified_at.2eea7e006d"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:54.288944Z", "completed_at": "2022-10-25T20:13:54.292235Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:54.292642Z", "completed_at": "2022-10-25T20:13:54.292645Z"}], "thread_id": "Thread-1 (worker)", "execution_time": 0.0042612552642822266, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__ad_group_history_ad_group_id__modified_at.84af14c83b"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:54.292700Z", "completed_at": "2022-10-25T20:13:54.295497Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:54.298386Z", "completed_at": "2022-10-25T20:13:54.298391Z"}], "thread_id": "Thread-3 (worker)", "execution_time": 0.006254911422729492, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_group_history_ad_group_id.dc128eecb7"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:54.295447Z", "completed_at": "2022-10-25T20:13:54.298772Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:54.299135Z", "completed_at": "2022-10-25T20:13:54.299138Z"}], "thread_id": "Thread-1 (worker)", "execution_time": 0.004312753677368164, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_group_history_modified_at.e5d65fa28f"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:54.299189Z", "completed_at": "2022-10-25T20:13:54.302545Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:54.304689Z", "completed_at": "2022-10-25T20:13:54.304693Z"}], "thread_id": "Thread-3 (worker)", "execution_time": 0.006070137023925781, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__ad_group_report_ad_group_id__date_day.a0fcc4e33c"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:54.302488Z", "completed_at": "2022-10-25T20:13:54.305053Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:54.305464Z", "completed_at": "2022-10-25T20:13:54.305467Z"}], "thread_id": "Thread-1 (worker)", "execution_time": 0.0034742355346679688, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_group_report_ad_group_id.a115f9cfc1"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:54.305519Z", "completed_at": "2022-10-25T20:13:54.308184Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:54.310777Z", "completed_at": "2022-10-25T20:13:54.310782Z"}], "thread_id": "Thread-3 (worker)", "execution_time": 0.005835056304931641, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_group_report_date_day.4dfd46a43b"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:54.308145Z", "completed_at": "2022-10-25T20:13:54.311140Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:54.311531Z", "completed_at": "2022-10-25T20:13:54.311534Z"}], "thread_id": "Thread-1 (worker)", "execution_time": 0.0038728713989257812, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__keyword_history_keyword_id__modified_at.7b06162d24"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:54.311584Z", "completed_at": "2022-10-25T20:13:54.314927Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:54.317101Z", "completed_at": "2022-10-25T20:13:54.317106Z"}], "thread_id": "Thread-3 (worker)", "execution_time": 0.006079912185668945, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__keyword_history_keyword_id.889f83cfd2"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:54.314888Z", "completed_at": "2022-10-25T20:13:54.317464Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:54.317847Z", "completed_at": "2022-10-25T20:13:54.317850Z"}], "thread_id": "Thread-1 (worker)", "execution_time": 0.0034399032592773438, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__keyword_history_modified_at.42fde5a287"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:54.317902Z", "completed_at": "2022-10-25T20:13:54.321221Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:54.323485Z", "completed_at": "2022-10-25T20:13:54.323490Z"}], "thread_id": "Thread-3 (worker)", "execution_time": 0.006137847900390625, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__keyword_report_keyword_id__date_day.9f0099cff8"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:54.321175Z", "completed_at": "2022-10-25T20:13:54.323927Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:54.324290Z", "completed_at": "2022-10-25T20:13:54.324293Z"}], "thread_id": "Thread-1 (worker)", "execution_time": 0.003659963607788086, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__keyword_report_date_day.16098db928"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:54.324348Z", "completed_at": "2022-10-25T20:13:54.327160Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:54.329875Z", "completed_at": "2022-10-25T20:13:54.329881Z"}], "thread_id": "Thread-3 (worker)", "execution_time": 0.00633692741394043, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__keyword_report_keyword_id.501725b09e"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:54.327211Z", "completed_at": "2022-10-25T20:13:54.330541Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:54.330918Z", "completed_at": "2022-10-25T20:13:54.330921Z"}], "thread_id": "Thread-1 (worker)", "execution_time": 0.004281759262084961, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__campaign_report_campaign_id__date_day.bad41b0481"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:54.330978Z", "completed_at": "2022-10-25T20:13:54.335210Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:54.337523Z", "completed_at": "2022-10-25T20:13:54.337529Z"}], "thread_id": "Thread-3 (worker)", "execution_time": 0.007122993469238281, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__campaign_report_campaign_id.b83941e728"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:54.335166Z", "completed_at": "2022-10-25T20:13:54.338137Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:54.338372Z", "completed_at": "2022-10-25T20:13:54.338376Z"}], "thread_id": "Thread-1 (worker)", "execution_time": 0.00634002685546875, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__campaign_report_date_day.c8dc10a6f3"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:54.338316Z", "completed_at": "2022-10-25T20:13:54.344697Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:54.344880Z", "completed_at": "2022-10-25T20:13:54.344885Z"}], "thread_id": "Thread-3 (worker)", "execution_time": 0.007169961929321289, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__campaign_history_campaign_id__modified_at.317f970af9"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:54.342251Z", "completed_at": "2022-10-25T20:13:54.345320Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:54.345720Z", "completed_at": "2022-10-25T20:13:54.345723Z"}], "thread_id": "Thread-1 (worker)", "execution_time": 0.00419306755065918, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__campaign_history_campaign_id.3f0f7502b8"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:54.345779Z", "completed_at": "2022-10-25T20:13:54.348329Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:54.348450Z", "completed_at": "2022-10-25T20:13:54.348454Z"}], "thread_id": "Thread-3 (worker)", "execution_time": 0.0032639503479003906, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__campaign_history_modified_at.f34a7a97c9"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:54.195656Z", "completed_at": "2022-10-25T20:13:54.556399Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:54.556767Z", "completed_at": "2022-10-25T20:13:54.556780Z"}], "thread_id": "Thread-4 (worker)", "execution_time": 0.36316418647766113, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.apple_search_ads_source.stg_apple_search_ads__organization"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:54.195734Z", "completed_at": "2022-10-25T20:13:54.576180Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:54.595237Z", "completed_at": "2022-10-25T20:13:54.595247Z"}], "thread_id": "Thread-2 (worker)", "execution_time": 0.40123510360717773, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.apple_search_ads_source.stg_apple_search_ads__search_term_report"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:54.576074Z", "completed_at": "2022-10-25T20:13:54.595877Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:54.596658Z", "completed_at": "2022-10-25T20:13:54.596663Z"}], "thread_id": "Thread-1 (worker)", "execution_time": 0.032414913177490234, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.apple_search_ads.apple_search_ads__ad_group_report"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:54.576270Z", "completed_at": "2022-10-25T20:13:54.596284Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:54.597211Z", "completed_at": "2022-10-25T20:13:54.597214Z"}], "thread_id": "Thread-3 (worker)", "execution_time": 0.022749900817871094, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.apple_search_ads.apple_search_ads__ad_report"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:54.576350Z", "completed_at": "2022-10-25T20:13:54.596588Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:54.597344Z", "completed_at": "2022-10-25T20:13:54.597346Z"}], "thread_id": "Thread-4 (worker)", "execution_time": 0.028183937072753906, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.apple_search_ads.apple_search_ads__campaign_report"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:54.597280Z", "completed_at": "2022-10-25T20:13:54.604547Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:54.609575Z", "completed_at": "2022-10-25T20:13:54.609581Z"}], "thread_id": "Thread-2 (worker)", "execution_time": 0.016181230545043945, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.apple_search_ads.apple_search_ads__keyword_report"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:54.604820Z", "completed_at": "2022-10-25T20:13:54.615022Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:54.615744Z", "completed_at": "2022-10-25T20:13:54.615749Z"}], "thread_id": "Thread-1 (worker)", "execution_time": 0.01244807243347168, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.apple_search_ads.apple_search_ads__organization_report"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:54.609506Z", "completed_at": "2022-10-25T20:13:54.615439Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:54.616324Z", "completed_at": "2022-10-25T20:13:54.616328Z"}], "thread_id": "Thread-3 (worker)", "execution_time": 0.012422800064086914, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__organization_organization_id.8647048f7a"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:54.609647Z", "completed_at": "2022-10-25T20:13:54.615800Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:54.616573Z", "completed_at": "2022-10-25T20:13:54.616576Z"}], "thread_id": "Thread-4 (worker)", "execution_time": 0.016308069229125977, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__organization_organization_id.b013ce33cb"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:54.616381Z", "completed_at": "2022-10-25T20:13:54.621365Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:54.624684Z", "completed_at": "2022-10-25T20:13:54.624689Z"}], "thread_id": "Thread-2 (worker)", "execution_time": 0.009513139724731445, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.apple_search_ads.apple_search_ads__search_term_report"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:54.621644Z", "completed_at": "2022-10-25T20:13:54.630225Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:54.630874Z", "completed_at": "2022-10-25T20:13:54.630881Z"}], "thread_id": "Thread-1 (worker)", "execution_time": 0.010662078857421875, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__search_term_report__fivetran_id__date_day.aad2a48344"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:54.624834Z", "completed_at": "2022-10-25T20:13:54.630929Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:54.631606Z", "completed_at": "2022-10-25T20:13:54.631609Z"}], "thread_id": "Thread-4 (worker)", "execution_time": 0.013434171676635742, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__search_term_report_date_day.fd93df3302"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:54.624746Z", "completed_at": "2022-10-25T20:13:54.630975Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:54.631663Z", "completed_at": "2022-10-25T20:13:54.631666Z"}], "thread_id": "Thread-3 (worker)", "execution_time": 0.013991832733154297, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__search_term_report__fivetran_id.aa430d1dad"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:54.631461Z", "completed_at": "2022-10-25T20:13:54.636109Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:54.638912Z", "completed_at": "2022-10-25T20:13:54.638917Z"}], "thread_id": "Thread-2 (worker)", "execution_time": 0.010569095611572266, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads.dbt_utils_unique_combination_of_columns_apple_search_ads__ad_group_report_organization_id__campaign_id__ad_group_id__date_day.19d180bab9"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:54.635849Z", "completed_at": "2022-10-25T20:13:54.639023Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:54.644686Z", "completed_at": "2022-10-25T20:13:54.644690Z"}], "thread_id": "Thread-1 (worker)", "execution_time": 0.010459184646606445, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads.not_null_apple_search_ads__ad_group_report_ad_group_id.60febec6b5"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:54.638835Z", "completed_at": "2022-10-25T20:13:54.644741Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:54.645574Z", "completed_at": "2022-10-25T20:13:54.645577Z"}], "thread_id": "Thread-4 (worker)", "execution_time": 0.010220050811767578, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads.not_null_apple_search_ads__ad_group_report_date_day.e6ffb30b3c"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:54.638978Z", "completed_at": "2022-10-25T20:13:54.645253Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:54.645933Z", "completed_at": "2022-10-25T20:13:54.645936Z"}], "thread_id": "Thread-3 (worker)", "execution_time": 0.013093233108520508, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads.dbt_utils_unique_combination_of_columns_apple_search_ads__ad_report_organization_id__campaign_id__ad_group_id__ad_id__date_day.54e27817a1"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:54.645629Z", "completed_at": "2022-10-25T20:13:54.651859Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:54.652423Z", "completed_at": "2022-10-25T20:13:54.652427Z"}], "thread_id": "Thread-2 (worker)", "execution_time": 0.01055598258972168, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads.not_null_apple_search_ads__ad_report_ad_id.0ab2c5075c"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:54.649482Z", "completed_at": "2022-10-25T20:13:54.652370Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:54.657602Z", "completed_at": "2022-10-25T20:13:54.657606Z"}], "thread_id": "Thread-1 (worker)", "execution_time": 0.01233530044555664, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads.not_null_apple_search_ads__ad_report_date_day.b86c049e17"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:54.652326Z", "completed_at": "2022-10-25T20:13:54.657842Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:54.658662Z", "completed_at": "2022-10-25T20:13:54.658666Z"}], "thread_id": "Thread-4 (worker)", "execution_time": 0.009531974792480469, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads.dbt_utils_unique_combination_of_columns_apple_search_ads__campaign_report_organization_id__campaign_id__date_day.647e56213f"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:54.652481Z", "completed_at": "2022-10-25T20:13:54.658403Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:54.659288Z", "completed_at": "2022-10-25T20:13:54.659291Z"}], "thread_id": "Thread-3 (worker)", "execution_time": 0.009945154190063477, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads.not_null_apple_search_ads__campaign_report_campaign_id.e26ed1e146"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:54.659002Z", "completed_at": "2022-10-25T20:13:54.662351Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:54.666007Z", "completed_at": "2022-10-25T20:13:54.666011Z"}], "thread_id": "Thread-2 (worker)", "execution_time": 0.010890960693359375, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads.not_null_apple_search_ads__campaign_report_date_day.35652b8d1a"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:54.661952Z", "completed_at": "2022-10-25T20:13:54.668780Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:54.671490Z", "completed_at": "2022-10-25T20:13:54.671494Z"}], "thread_id": "Thread-1 (worker)", "execution_time": 0.01318216323852539, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads.dbt_utils_unique_combination_of_columns_apple_search_ads__keyword_report_organization_id__campaign_id__ad_group_id__keyword_id__date_day.78fb033a13"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:54.665866Z", "completed_at": "2022-10-25T20:13:54.671333Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:54.672121Z", "completed_at": "2022-10-25T20:13:54.672126Z"}], "thread_id": "Thread-4 (worker)", "execution_time": 0.010465145111083984, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads.not_null_apple_search_ads__keyword_report_date_day.3dec8d0e82"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:54.668844Z", "completed_at": "2022-10-25T20:13:54.672065Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:54.672825Z", "completed_at": "2022-10-25T20:13:54.672828Z"}], "thread_id": "Thread-3 (worker)", "execution_time": 0.010111093521118164, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads.not_null_apple_search_ads__keyword_report_keyword_id.ea493710db"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:54.672596Z", "completed_at": "2022-10-25T20:13:54.676271Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:54.678785Z", "completed_at": "2022-10-25T20:13:54.678789Z"}], "thread_id": "Thread-2 (worker)", "execution_time": 0.009535074234008789, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads.dbt_utils_unique_combination_of_columns_apple_search_ads__organization_report_organization_id__date_day.8bc84fccc3"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:54.676114Z", "completed_at": "2022-10-25T20:13:54.680905Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:54.684204Z", "completed_at": "2022-10-25T20:13:54.684208Z"}], "thread_id": "Thread-1 (worker)", "execution_time": 0.012161016464233398, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads.not_null_apple_search_ads__organization_report_date_day.5784fed523"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:54.678622Z", "completed_at": "2022-10-25T20:13:54.684023Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:54.684930Z", "completed_at": "2022-10-25T20:13:54.684933Z"}], "thread_id": "Thread-4 (worker)", "execution_time": 0.00958395004272461, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads.not_null_apple_search_ads__organization_report_organization_id.b6cf7d69f8"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:54.680981Z", "completed_at": "2022-10-25T20:13:54.684616Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:54.685549Z", "completed_at": "2022-10-25T20:13:54.685551Z"}], "thread_id": "Thread-3 (worker)", "execution_time": 0.010687112808227539, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads.dbt_utils_unique_combination_of_columns_apple_search_ads__search_term_report_search_term_text__date_day.e60fe79ec4"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:54.685477Z", "completed_at": "2022-10-25T20:13:54.691517Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:54.691731Z", "completed_at": "2022-10-25T20:13:54.691735Z"}], "thread_id": "Thread-2 (worker)", "execution_time": 0.00758814811706543, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads.not_null_apple_search_ads__search_term_report_date_day.1bc3b0d57c"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:54.689405Z", "completed_at": "2022-10-25T20:13:54.691777Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:54.692247Z", "completed_at": "2022-10-25T20:13:54.692250Z"}], "thread_id": "Thread-1 (worker)", "execution_time": 0.0068280696868896484, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads.not_null_apple_search_ads__search_term_report_search_term_text.aecc7447f7"}], "elapsed_time": 3.5940489768981934, "args": {"write_json": true, "use_colors": true, "printer_width": 80, "version_check": true, "partial_parse": true, "static_parser": true, "profiles_dir": "/Users/jamie.rodriguez/.dbt", "send_anonymous_usage_stats": true, "event_buffer_size": 100000, "quiet": false, "no_print": false, "compile": true, "which": "generate", "rpc_method": "docs.generate", "indirect_selection": "eager"}} \ No newline at end of file From 2f2e81b122ed3a7d31e7cad5fe7824dd437cf066 Mon Sep 17 00:00:00 2001 From: Sheri Nguyen Date: Thu, 17 Nov 2022 10:18:13 -0900 Subject: [PATCH 15/18] Update dbt adapter versions and dbt required versions --- .buildkite/pipeline.yml | 2 +- .buildkite/scripts/run_models.sh | 2 ++ .github/pull_request_template.md | 5 ++--- integration_tests/ci/sample.profiles.yml | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index b84fe04..4c799f0 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -58,7 +58,7 @@ steps: commands: | bash .buildkite/scripts/run_models.sh redshift - - label: ":upside_down_face: Run Tests - Databricks" + - label: ":bricks: Run Tests - Databricks" key: "run_dbt_databricks" plugins: - docker#v3.13.0: diff --git a/.buildkite/scripts/run_models.sh b/.buildkite/scripts/run_models.sh index 9e4a115..d15dfcb 100644 --- a/.buildkite/scripts/run_models.sh +++ b/.buildkite/scripts/run_models.sh @@ -1,5 +1,7 @@ #!/bin/bash +set -euo pipefail + apt-get update apt-get install libsasl2-dev diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 35f658d..50ee0df 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -1,4 +1,3 @@ -Pull Request **Are you a current Fivetran customer?** @@ -29,9 +28,9 @@ Pull Request **How did you test the PR changes?** - + -- [ ] CircleCi +- [ ] Buildkite - [ ] Local (please provide additional testing details below) **Select which warehouse(s) were used to test the PR** diff --git a/integration_tests/ci/sample.profiles.yml b/integration_tests/ci/sample.profiles.yml index cbe6369..8a55656 100644 --- a/integration_tests/ci/sample.profiles.yml +++ b/integration_tests/ci/sample.profiles.yml @@ -1,5 +1,5 @@ -# HEY! This file is used in the dbt package integrations tests with CircleCI. +# HEY! This file is used in the dbt package integrations tests with Buildkite. # You should __NEVER__ check credentials into version control. Thanks for reading :) config: From 44f4726265618c2b4e8578f1c30d90dc2c51c01d Mon Sep 17 00:00:00 2001 From: fivetran-joemarkiewicz Date: Mon, 19 Dec 2022 21:05:25 -0600 Subject: [PATCH 16/18] docs regen --- README.md | 3 +++ docs/catalog.json | 2 +- docs/manifest.json | 2 +- docs/run_results.json | 2 +- 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 867a2de..34b8f44 100644 --- a/README.md +++ b/README.md @@ -148,6 +148,9 @@ packages: - package: dbt-labs/dbt_utils version: [">=1.0.0", "<2.0.0"] + + - package: dbt-labs/spark_utils + version: [">=0.3.0", "<0.4.0"] ``` # 🙌 How is this package maintained and can I contribute? ## Package Maintenance diff --git a/docs/catalog.json b/docs/catalog.json index aa40424..1d68565 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.3.0", "generated_at": "2022-10-25T20:13:58.301143Z", "invocation_id": "2191920f-7f18-410e-bf49-1ac3da176caa", "env": {}}, "nodes": {"model.apple_search_ads.apple_search_ads__ad_report": {"metadata": {"type": "table", "schema": "apple_search_ads_integration_tests_apple_search_ads", "name": "apple_search_ads__ad_report", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"date_day": {"type": "DATE", "index": 1, "name": "date_day", "comment": null}, "organization_id": {"type": "INT64", "index": 2, "name": "organization_id", "comment": null}, "organization_name": {"type": "STRING", "index": 3, "name": "organization_name", "comment": null}, "campaign_id": {"type": "INT64", "index": 4, "name": "campaign_id", "comment": null}, "campaign_name": {"type": "STRING", "index": 5, "name": "campaign_name", "comment": null}, "ad_group_id": {"type": "INT64", "index": 6, "name": "ad_group_id", "comment": null}, "ad_group_name": {"type": "STRING", "index": 7, "name": "ad_group_name", "comment": null}, "ad_id": {"type": "INT64", "index": 8, "name": "ad_id", "comment": null}, "ad_name": {"type": "STRING", "index": 9, "name": "ad_name", "comment": null}, "currency": {"type": "STRING", "index": 10, "name": "currency", "comment": null}, "ad_status": {"type": "STRING", "index": 11, "name": "ad_status", "comment": null}, "taps": {"type": "INT64", "index": 12, "name": "taps", "comment": null}, "new_downloads": {"type": "INT64", "index": 13, "name": "new_downloads", "comment": null}, "redownloads": {"type": "INT64", "index": 14, "name": "redownloads", "comment": null}, "total_downloads": {"type": "INT64", "index": 15, "name": "total_downloads", "comment": null}, "impressions": {"type": "INT64", "index": 16, "name": "impressions", "comment": null}, "spend": {"type": "FLOAT64", "index": 17, "name": "spend", "comment": null}}, "stats": {"num_rows": {"id": "num_rows", "label": "# Rows", "value": 0.0, "include": true, "description": "Approximate count of rows in this table"}, "num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 0.0, "include": true, "description": "Approximate size of table as reported by BigQuery"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "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__search_term_report": {"metadata": {"type": "table", "schema": "apple_search_ads_integration_tests_apple_search_ads", "name": "apple_search_ads__search_term_report", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"date_day": {"type": "DATE", "index": 1, "name": "date_day", "comment": null}, "organization_id": {"type": "INT64", "index": 2, "name": "organization_id", "comment": null}, "organization_name": {"type": "STRING", "index": 3, "name": "organization_name", "comment": null}, "campaign_id": {"type": "INT64", "index": 4, "name": "campaign_id", "comment": null}, "campaign_name": {"type": "STRING", "index": 5, "name": "campaign_name", "comment": null}, "ad_group_id": {"type": "INT64", "index": 6, "name": "ad_group_id", "comment": null}, "ad_group_name": {"type": "STRING", "index": 7, "name": "ad_group_name", "comment": null}, "keyword_id": {"type": "INT64", "index": 8, "name": "keyword_id", "comment": null}, "keyword_text": {"type": "STRING", "index": 9, "name": "keyword_text", "comment": null}, "search_term_text": {"type": "STRING", "index": 10, "name": "search_term_text", "comment": null}, "match_type": {"type": "STRING", "index": 11, "name": "match_type", "comment": null}, "currency": {"type": "STRING", "index": 12, "name": "currency", "comment": null}, "taps": {"type": "INT64", "index": 13, "name": "taps", "comment": null}, "new_downloads": {"type": "INT64", "index": 14, "name": "new_downloads", "comment": null}, "redownloads": {"type": "INT64", "index": 15, "name": "redownloads", "comment": null}, "total_downloads": {"type": "INT64", "index": 16, "name": "total_downloads", "comment": null}, "impressions": {"type": "INT64", "index": 17, "name": "impressions", "comment": null}, "spend": {"type": "FLOAT64", "index": 18, "name": "spend", "comment": null}}, "stats": {"num_rows": {"id": "num_rows", "label": "# Rows", "value": 38.0, "include": true, "description": "Approximate count of rows in this table"}, "num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 5544.0, "include": true, "description": "Approximate size of table as reported by BigQuery"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.apple_search_ads.apple_search_ads__search_term_report"}, "model.apple_search_ads.apple_search_ads__organization_report": {"metadata": {"type": "table", "schema": "apple_search_ads_integration_tests_apple_search_ads", "name": "apple_search_ads__organization_report", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"date_day": {"type": "DATE", "index": 1, "name": "date_day", "comment": null}, "organization_id": {"type": "INT64", "index": 2, "name": "organization_id", "comment": null}, "organization_name": {"type": "STRING", "index": 3, "name": "organization_name", "comment": null}, "currency": {"type": "STRING", "index": 4, "name": "currency", "comment": null}, "taps": {"type": "INT64", "index": 5, "name": "taps", "comment": null}, "new_downloads": {"type": "INT64", "index": 6, "name": "new_downloads", "comment": null}, "redownloads": {"type": "INT64", "index": 7, "name": "redownloads", "comment": null}, "total_downloads": {"type": "INT64", "index": 8, "name": "total_downloads", "comment": null}, "impressions": {"type": "INT64", "index": 9, "name": "impressions", "comment": null}, "spend": {"type": "FLOAT64", "index": 10, "name": "spend", "comment": null}}, "stats": {"num_rows": {"id": "num_rows", "label": "# Rows", "value": 12.0, "include": true, "description": "Approximate count of rows in this table"}, "num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 984.0, "include": true, "description": "Approximate size of table as reported by BigQuery"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "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__keyword_report": {"metadata": {"type": "table", "schema": "apple_search_ads_integration_tests_apple_search_ads", "name": "apple_search_ads__keyword_report", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"date_day": {"type": "DATE", "index": 1, "name": "date_day", "comment": null}, "organization_id": {"type": "INT64", "index": 2, "name": "organization_id", "comment": null}, "organization_name": {"type": "STRING", "index": 3, "name": "organization_name", "comment": null}, "campaign_id": {"type": "INT64", "index": 4, "name": "campaign_id", "comment": null}, "campaign_name": {"type": "STRING", "index": 5, "name": "campaign_name", "comment": null}, "ad_group_id": {"type": "INT64", "index": 6, "name": "ad_group_id", "comment": null}, "ad_group_name": {"type": "STRING", "index": 7, "name": "ad_group_name", "comment": null}, "keyword_id": {"type": "INT64", "index": 8, "name": "keyword_id", "comment": null}, "keyword_text": {"type": "STRING", "index": 9, "name": "keyword_text", "comment": null}, "match_type": {"type": "STRING", "index": 10, "name": "match_type", "comment": null}, "currency": {"type": "STRING", "index": 11, "name": "currency", "comment": null}, "keyword_status": {"type": "STRING", "index": 12, "name": "keyword_status", "comment": null}, "taps": {"type": "INT64", "index": 13, "name": "taps", "comment": null}, "new_downloads": {"type": "INT64", "index": 14, "name": "new_downloads", "comment": null}, "redownloads": {"type": "INT64", "index": 15, "name": "redownloads", "comment": null}, "total_downloads": {"type": "INT64", "index": 16, "name": "total_downloads", "comment": null}, "impressions": {"type": "INT64", "index": 17, "name": "impressions", "comment": null}, "spend": {"type": "FLOAT64", "index": 18, "name": "spend", "comment": null}}, "stats": {"num_rows": {"id": "num_rows", "label": "# Rows", "value": 99.0, "include": true, "description": "Approximate count of rows in this table"}, "num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 15510.0, "include": true, "description": "Approximate size of table as reported by BigQuery"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "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__campaign_report": {"metadata": {"type": "table", "schema": "apple_search_ads_integration_tests_apple_search_ads", "name": "apple_search_ads__campaign_report", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"date_day": {"type": "DATE", "index": 1, "name": "date_day", "comment": null}, "organization_id": {"type": "INT64", "index": 2, "name": "organization_id", "comment": null}, "organization_name": {"type": "STRING", "index": 3, "name": "organization_name", "comment": null}, "campaign_id": {"type": "INT64", "index": 4, "name": "campaign_id", "comment": null}, "campaign_name": {"type": "STRING", "index": 5, "name": "campaign_name", "comment": null}, "currency": {"type": "STRING", "index": 6, "name": "currency", "comment": null}, "campaign_status": {"type": "STRING", "index": 7, "name": "campaign_status", "comment": null}, "start_at": {"type": "TIMESTAMP", "index": 8, "name": "start_at", "comment": null}, "end_at": {"type": "TIMESTAMP", "index": 9, "name": "end_at", "comment": null}, "taps": {"type": "INT64", "index": 10, "name": "taps", "comment": null}, "new_downloads": {"type": "INT64", "index": 11, "name": "new_downloads", "comment": null}, "redownloads": {"type": "INT64", "index": 12, "name": "redownloads", "comment": null}, "total_downloads": {"type": "INT64", "index": 13, "name": "total_downloads", "comment": null}, "impressions": {"type": "INT64", "index": 14, "name": "impressions", "comment": null}, "spend": {"type": "FLOAT64", "index": 15, "name": "spend", "comment": null}}, "stats": {"num_rows": {"id": "num_rows", "label": "# Rows", "value": 12.0, "include": true, "description": "Approximate count of rows in this table"}, "num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 1488.0, "include": true, "description": "Approximate size of table as reported by BigQuery"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "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__ad_group_report": {"metadata": {"type": "table", "schema": "apple_search_ads_integration_tests_apple_search_ads", "name": "apple_search_ads__ad_group_report", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"date_day": {"type": "DATE", "index": 1, "name": "date_day", "comment": null}, "organization_id": {"type": "INT64", "index": 2, "name": "organization_id", "comment": null}, "organization_name": {"type": "STRING", "index": 3, "name": "organization_name", "comment": null}, "campaign_id": {"type": "INT64", "index": 4, "name": "campaign_id", "comment": null}, "campaign_name": {"type": "STRING", "index": 5, "name": "campaign_name", "comment": null}, "ad_group_id": {"type": "INT64", "index": 6, "name": "ad_group_id", "comment": null}, "ad_group_name": {"type": "STRING", "index": 7, "name": "ad_group_name", "comment": null}, "currency": {"type": "STRING", "index": 8, "name": "currency", "comment": null}, "ad_group_status": {"type": "STRING", "index": 9, "name": "ad_group_status", "comment": null}, "start_at": {"type": "TIMESTAMP", "index": 10, "name": "start_at", "comment": null}, "end_at": {"type": "TIMESTAMP", "index": 11, "name": "end_at", "comment": null}, "taps": {"type": "INT64", "index": 12, "name": "taps", "comment": null}, "new_downloads": {"type": "INT64", "index": 13, "name": "new_downloads", "comment": null}, "redownloads": {"type": "INT64", "index": 14, "name": "redownloads", "comment": null}, "total_downloads": {"type": "INT64", "index": 15, "name": "total_downloads", "comment": null}, "impressions": {"type": "INT64", "index": 16, "name": "impressions", "comment": null}, "spend": {"type": "FLOAT64", "index": 17, "name": "spend", "comment": null}}, "stats": {"num_rows": {"id": "num_rows", "label": "# Rows", "value": 13.0, "include": true, "description": "Approximate count of rows in this table"}, "num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 1925.0, "include": true, "description": "Approximate size of table as reported by BigQuery"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "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_source.stg_apple_search_ads__ad_group_history_tmp": {"metadata": {"type": "view", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "name": "stg_apple_search_ads__ad_group_history_tmp", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"id": {"type": "INT64", "index": 1, "name": "id", "comment": null}, "modification_time": {"type": "TIMESTAMP", "index": 2, "name": "modification_time", "comment": null}, "automated_keywords_opt_in": {"type": "BOOL", "index": 3, "name": "automated_keywords_opt_in", "comment": null}, "campaign_id": {"type": "INT64", "index": 4, "name": "campaign_id", "comment": null}, "cpa_goal_amount": {"type": "INT64", "index": 5, "name": "cpa_goal_amount", "comment": null}, "cpa_goal_currency": {"type": "INT64", "index": 6, "name": "cpa_goal_currency", "comment": null}, "default_cpc_bid_amount": {"type": "INT64", "index": 7, "name": "default_cpc_bid_amount", "comment": null}, "default_cpc_bid_currency": {"type": "INT64", "index": 8, "name": "default_cpc_bid_currency", "comment": null}, "deleted": {"type": "BOOL", "index": 9, "name": "deleted", "comment": null}, "end_time": {"type": "TIMESTAMP", "index": 10, "name": "end_time", "comment": null}, "name": {"type": "STRING", "index": 11, "name": "name", "comment": null}, "organization_id": {"type": "INT64", "index": 12, "name": "organization_id", "comment": null}, "serving_state_reasons": {"type": "INT64", "index": 13, "name": "serving_state_reasons", "comment": null}, "serving_status": {"type": "STRING", "index": 14, "name": "serving_status", "comment": null}, "start_time": {"type": "TIMESTAMP", "index": 15, "name": "start_time", "comment": null}, "status": {"type": "STRING", "index": 16, "name": "status", "comment": null}, "storefronts": {"type": "INT64", "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_source.stg_apple_search_ads__ad_group_history_tmp"}, "model.apple_search_ads_source.stg_apple_search_ads__organization": {"metadata": {"type": "table", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "name": "stg_apple_search_ads__organization", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"organization_id": {"type": "INT64", "index": 1, "name": "organization_id", "comment": null}, "currency": {"type": "STRING", "index": 2, "name": "currency", "comment": null}, "payment_model": {"type": "STRING", "index": 3, "name": "payment_model", "comment": null}, "organization_name": {"type": "STRING", "index": 4, "name": "organization_name", "comment": null}, "time_zone": {"type": "STRING", "index": 5, "name": "time_zone", "comment": null}}, "stats": {"num_rows": {"id": "num_rows", "label": "# Rows", "value": 2.0, "include": true, "description": "Approximate count of rows in this table"}, "num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 80.0, "include": true, "description": "Approximate size of table as reported by BigQuery"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.apple_search_ads_source.stg_apple_search_ads__organization"}, "model.apple_search_ads_source.stg_apple_search_ads__ad_report": {"metadata": {"type": "table", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "name": "stg_apple_search_ads__ad_report", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"date_day": {"type": "DATE", "index": 1, "name": "date_day", "comment": null}, "campaign_id": {"type": "INT64", "index": 2, "name": "campaign_id", "comment": null}, "ad_group_id": {"type": "INT64", "index": 3, "name": "ad_group_id", "comment": null}, "ad_id": {"type": "INT64", "index": 4, "name": "ad_id", "comment": null}, "impressions": {"type": "INT64", "index": 5, "name": "impressions", "comment": null}, "spend": {"type": "FLOAT64", "index": 6, "name": "spend", "comment": null}, "currency": {"type": "STRING", "index": 7, "name": "currency", "comment": null}, "new_downloads": {"type": "INT64", "index": 8, "name": "new_downloads", "comment": null}, "redownloads": {"type": "INT64", "index": 9, "name": "redownloads", "comment": null}, "taps": {"type": "INT64", "index": 10, "name": "taps", "comment": null}}, "stats": {"num_rows": {"id": "num_rows", "label": "# Rows", "value": 2.0, "include": true, "description": "Approximate count of rows in this table"}, "num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 154.0, "include": true, "description": "Approximate size of table as reported by BigQuery"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.apple_search_ads_source.stg_apple_search_ads__ad_report"}, "model.apple_search_ads_source.stg_apple_search_ads__ad_group_report_tmp": {"metadata": {"type": "view", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "name": "stg_apple_search_ads__ad_group_report_tmp", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"ad_group_id": {"type": "INT64", "index": 1, "name": "ad_group_id", "comment": null}, "date": {"type": "DATE", "index": 2, "name": "date", "comment": null}, "avg_cpa_amount": {"type": "FLOAT64", "index": 3, "name": "avg_cpa_amount", "comment": null}, "avg_cpa_currency": {"type": "STRING", "index": 4, "name": "avg_cpa_currency", "comment": null}, "avg_cpt_amount": {"type": "FLOAT64", "index": 5, "name": "avg_cpt_amount", "comment": null}, "avg_cpt_currency": {"type": "STRING", "index": 6, "name": "avg_cpt_currency", "comment": null}, "conversion_rate": {"type": "FLOAT64", "index": 7, "name": "conversion_rate", "comment": null}, "conversions": {"type": "INT64", "index": 8, "name": "conversions", "comment": null}, "impressions": {"type": "INT64", "index": 9, "name": "impressions", "comment": null}, "lat_off_installs": {"type": "INT64", "index": 10, "name": "lat_off_installs", "comment": null}, "lat_on_installs": {"type": "INT64", "index": 11, "name": "lat_on_installs", "comment": null}, "local_spend_amount": {"type": "FLOAT64", "index": 12, "name": "local_spend_amount", "comment": null}, "local_spend_currency": {"type": "STRING", "index": 13, "name": "local_spend_currency", "comment": null}, "new_downloads": {"type": "INT64", "index": 14, "name": "new_downloads", "comment": null}, "redownloads": {"type": "INT64", "index": 15, "name": "redownloads", "comment": null}, "tap_through_rate": {"type": "FLOAT64", "index": 16, "name": "tap_through_rate", "comment": null}, "taps": {"type": "INT64", "index": 17, "name": "taps", "comment": null}}, "stats": {"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_source.stg_apple_search_ads__ad_group_report_tmp"}, "model.apple_search_ads_source.stg_apple_search_ads__ad_report_tmp": {"metadata": {"type": "view", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "name": "stg_apple_search_ads__ad_report_tmp", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"date": {"type": "DATE", "index": 1, "name": "date", "comment": null}, "_fivetran_synced": {"type": "TIMESTAMP", "index": 2, "name": "_fivetran_synced", "comment": null}, "campaign_id": {"type": "INT64", "index": 3, "name": "campaign_id", "comment": null}, "ad_group_id": {"type": "INT64", "index": 4, "name": "ad_group_id", "comment": null}, "ad_id": {"type": "INT64", "index": 5, "name": "ad_id", "comment": null}, "impressions": {"type": "INT64", "index": 6, "name": "impressions", "comment": null}, "local_spend_amount": {"type": "FLOAT64", "index": 7, "name": "local_spend_amount", "comment": null}, "local_spend_currency": {"type": "STRING", "index": 8, "name": "local_spend_currency", "comment": null}, "new_downloads": {"type": "INT64", "index": 9, "name": "new_downloads", "comment": null}, "redownloads": {"type": "INT64", "index": 10, "name": "redownloads", "comment": null}, "taps": {"type": "INT64", "index": 11, "name": "taps", "comment": null}}, "stats": {"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_source.stg_apple_search_ads__ad_report_tmp"}, "model.apple_search_ads_source.stg_apple_search_ads__search_term_report": {"metadata": {"type": "table", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "name": "stg_apple_search_ads__search_term_report", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"date_day": {"type": "DATE", "index": 1, "name": "date_day", "comment": null}, "_fivetran_id": {"type": "STRING", "index": 2, "name": "_fivetran_id", "comment": null}, "campaign_id": {"type": "INT64", "index": 3, "name": "campaign_id", "comment": null}, "ad_group_id": {"type": "INT64", "index": 4, "name": "ad_group_id", "comment": null}, "ad_group_name": {"type": "STRING", "index": 5, "name": "ad_group_name", "comment": null}, "bid_amount": {"type": "FLOAT64", "index": 6, "name": "bid_amount", "comment": null}, "bid_currency": {"type": "STRING", "index": 7, "name": "bid_currency", "comment": null}, "keyword_text": {"type": "STRING", "index": 8, "name": "keyword_text", "comment": null}, "keyword_display_status": {"type": "STRING", "index": 9, "name": "keyword_display_status", "comment": null}, "keyword_id": {"type": "INT64", "index": 10, "name": "keyword_id", "comment": null}, "spend": {"type": "FLOAT64", "index": 11, "name": "spend", "comment": null}, "currency": {"type": "STRING", "index": 12, "name": "currency", "comment": null}, "match_type": {"type": "STRING", "index": 13, "name": "match_type", "comment": null}, "search_term_source": {"type": "STRING", "index": 14, "name": "search_term_source", "comment": null}, "search_term_text": {"type": "STRING", "index": 15, "name": "search_term_text", "comment": null}, "impressions": {"type": "INT64", "index": 16, "name": "impressions", "comment": null}, "taps": {"type": "INT64", "index": 17, "name": "taps", "comment": null}, "new_downloads": {"type": "INT64", "index": 18, "name": "new_downloads", "comment": null}, "redownloads": {"type": "INT64", "index": 19, "name": "redownloads", "comment": null}}, "stats": {"num_rows": {"id": "num_rows", "label": "# Rows", "value": 150.0, "include": true, "description": "Approximate count of rows in this table"}, "num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 25324.0, "include": true, "description": "Approximate size of table as reported by BigQuery"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.apple_search_ads_source.stg_apple_search_ads__search_term_report"}, "model.apple_search_ads_source.stg_apple_search_ads__search_term_report_tmp": {"metadata": {"type": "view", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "name": "stg_apple_search_ads__search_term_report_tmp", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"_fivetran_id": {"type": "STRING", "index": 1, "name": "_fivetran_id", "comment": null}, "ad_group_id": {"type": "INT64", "index": 2, "name": "ad_group_id", "comment": null}, "campaign_id": {"type": "INT64", "index": 3, "name": "campaign_id", "comment": null}, "date": {"type": "DATE", "index": 4, "name": "date", "comment": null}, "ad_group_deleted": {"type": "BOOL", "index": 5, "name": "ad_group_deleted", "comment": null}, "ad_group_name": {"type": "STRING", "index": 6, "name": "ad_group_name", "comment": null}, "avg_cpa_amount": {"type": "FLOAT64", "index": 7, "name": "avg_cpa_amount", "comment": null}, "avg_cpa_currency": {"type": "STRING", "index": 8, "name": "avg_cpa_currency", "comment": null}, "avg_cpt_amount": {"type": "FLOAT64", "index": 9, "name": "avg_cpt_amount", "comment": null}, "avg_cpt_currency": {"type": "STRING", "index": 10, "name": "avg_cpt_currency", "comment": null}, "bid_amount_amount": {"type": "FLOAT64", "index": 11, "name": "bid_amount_amount", "comment": null}, "bid_amount_currency": {"type": "STRING", "index": 12, "name": "bid_amount_currency", "comment": null}, "conversion_rate": {"type": "FLOAT64", "index": 13, "name": "conversion_rate", "comment": null}, "conversions": {"type": "INT64", "index": 14, "name": "conversions", "comment": null}, "deleted": {"type": "BOOL", "index": 15, "name": "deleted", "comment": null}, "impressions": {"type": "INT64", "index": 16, "name": "impressions", "comment": null}, "keyword": {"type": "STRING", "index": 17, "name": "keyword", "comment": null}, "keyword_display_status": {"type": "STRING", "index": 18, "name": "keyword_display_status", "comment": null}, "keyword_id": {"type": "INT64", "index": 19, "name": "keyword_id", "comment": null}, "lat_off_installs": {"type": "INT64", "index": 20, "name": "lat_off_installs", "comment": null}, "lat_on_installs": {"type": "INT64", "index": 21, "name": "lat_on_installs", "comment": null}, "local_spend_amount": {"type": "FLOAT64", "index": 22, "name": "local_spend_amount", "comment": null}, "local_spend_currency": {"type": "STRING", "index": 23, "name": "local_spend_currency", "comment": null}, "match_type": {"type": "STRING", "index": 24, "name": "match_type", "comment": null}, "new_downloads": {"type": "INT64", "index": 25, "name": "new_downloads", "comment": null}, "redownloads": {"type": "INT64", "index": 26, "name": "redownloads", "comment": null}, "search_term_source": {"type": "STRING", "index": 27, "name": "search_term_source", "comment": null}, "search_term_text": {"type": "STRING", "index": 28, "name": "search_term_text", "comment": null}, "tap_through_rate": {"type": "FLOAT64", "index": 29, "name": "tap_through_rate", "comment": null}, "taps": {"type": "INT64", "index": 30, "name": "taps", "comment": null}}, "stats": {"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_source.stg_apple_search_ads__search_term_report_tmp"}, "model.apple_search_ads_source.stg_apple_search_ads__keyword_report_tmp": {"metadata": {"type": "view", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "name": "stg_apple_search_ads__keyword_report_tmp", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"date": {"type": "DATE", "index": 1, "name": "date", "comment": null}, "id": {"type": "INT64", "index": 2, "name": "id", "comment": null}, "avg_cpa_amount": {"type": "FLOAT64", "index": 3, "name": "avg_cpa_amount", "comment": null}, "avg_cpa_currency": {"type": "STRING", "index": 4, "name": "avg_cpa_currency", "comment": null}, "avg_cpt_amount": {"type": "FLOAT64", "index": 5, "name": "avg_cpt_amount", "comment": null}, "avg_cpt_currency": {"type": "STRING", "index": 6, "name": "avg_cpt_currency", "comment": null}, "conversion_rate": {"type": "FLOAT64", "index": 7, "name": "conversion_rate", "comment": null}, "conversions": {"type": "INT64", "index": 8, "name": "conversions", "comment": null}, "impressions": {"type": "INT64", "index": 9, "name": "impressions", "comment": null}, "lat_off_installs": {"type": "INT64", "index": 10, "name": "lat_off_installs", "comment": null}, "lat_on_installs": {"type": "INT64", "index": 11, "name": "lat_on_installs", "comment": null}, "local_spend_amount": {"type": "FLOAT64", "index": 12, "name": "local_spend_amount", "comment": null}, "local_spend_currency": {"type": "STRING", "index": 13, "name": "local_spend_currency", "comment": null}, "new_downloads": {"type": "INT64", "index": 14, "name": "new_downloads", "comment": null}, "redownloads": {"type": "INT64", "index": 15, "name": "redownloads", "comment": null}, "tap_through_rate": {"type": "FLOAT64", "index": 16, "name": "tap_through_rate", "comment": null}, "taps": {"type": "INT64", "index": 17, "name": "taps", "comment": null}}, "stats": {"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_source.stg_apple_search_ads__keyword_report_tmp"}, "model.apple_search_ads_source.stg_apple_search_ads__campaign_report": {"metadata": {"type": "table", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "name": "stg_apple_search_ads__campaign_report", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"date_day": {"type": "DATE", "index": 1, "name": "date_day", "comment": null}, "campaign_id": {"type": "INT64", "index": 2, "name": "campaign_id", "comment": null}, "impressions": {"type": "INT64", "index": 3, "name": "impressions", "comment": null}, "spend": {"type": "FLOAT64", "index": 4, "name": "spend", "comment": null}, "currency": {"type": "STRING", "index": 5, "name": "currency", "comment": null}, "new_downloads": {"type": "INT64", "index": 6, "name": "new_downloads", "comment": null}, "redownloads": {"type": "INT64", "index": 7, "name": "redownloads", "comment": null}, "taps": {"type": "INT64", "index": 8, "name": "taps", "comment": null}}, "stats": {"num_rows": {"id": "num_rows", "label": "# Rows", "value": 12.0, "include": true, "description": "Approximate count of rows in this table"}, "num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 732.0, "include": true, "description": "Approximate size of table as reported by BigQuery"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.apple_search_ads_source.stg_apple_search_ads__campaign_report"}, "model.apple_search_ads_source.stg_apple_search_ads__organization_tmp": {"metadata": {"type": "view", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "name": "stg_apple_search_ads__organization_tmp", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"id": {"type": "INT64", "index": 1, "name": "id", "comment": null}, "currency": {"type": "STRING", "index": 2, "name": "currency", "comment": null}, "name": {"type": "STRING", "index": 3, "name": "name", "comment": null}, "payment_model": {"type": "STRING", "index": 4, "name": "payment_model", "comment": null}, "role_names": {"type": "STRING", "index": 5, "name": "role_names", "comment": null}, "time_zone": {"type": "STRING", "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_source.stg_apple_search_ads__organization_tmp"}, "model.apple_search_ads_source.stg_apple_search_ads__campaign_history_tmp": {"metadata": {"type": "view", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "name": "stg_apple_search_ads__campaign_history_tmp", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"id": {"type": "INT64", "index": 1, "name": "id", "comment": null}, "modification_time": {"type": "TIMESTAMP", "index": 2, "name": "modification_time", "comment": null}, "adam_id": {"type": "INT64", "index": 3, "name": "adam_id", "comment": null}, "budget_amount": {"type": "INT64", "index": 4, "name": "budget_amount", "comment": null}, "budget_currency": {"type": "STRING", "index": 5, "name": "budget_currency", "comment": null}, "budget_orders": {"type": "STRING", "index": 6, "name": "budget_orders", "comment": null}, "daily_budget_amount": {"type": "INT64", "index": 7, "name": "daily_budget_amount", "comment": null}, "daily_budget_currency": {"type": "STRING", "index": 8, "name": "daily_budget_currency", "comment": null}, "deleted": {"type": "BOOL", "index": 9, "name": "deleted", "comment": null}, "end_time": {"type": "TIMESTAMP", "index": 10, "name": "end_time", "comment": null}, "loc_invoice_detail_buyer_email": {"type": "INT64", "index": 11, "name": "loc_invoice_detail_buyer_email", "comment": null}, "loc_invoice_detail_buyer_name": {"type": "INT64", "index": 12, "name": "loc_invoice_detail_buyer_name", "comment": null}, "loc_invoice_detail_client_name": {"type": "INT64", "index": 13, "name": "loc_invoice_detail_client_name", "comment": null}, "loc_invoice_detail_order_number": {"type": "INT64", "index": 14, "name": "loc_invoice_detail_order_number", "comment": null}, "name": {"type": "STRING", "index": 15, "name": "name", "comment": null}, "organization_id": {"type": "INT64", "index": 16, "name": "organization_id", "comment": null}, "payment_model": {"type": "STRING", "index": 17, "name": "payment_model", "comment": null}, "serving_state_reasons": {"type": "STRING", "index": 18, "name": "serving_state_reasons", "comment": null}, "serving_status": {"type": "STRING", "index": 19, "name": "serving_status", "comment": null}, "start_time": {"type": "TIMESTAMP", "index": 20, "name": "start_time", "comment": null}, "status": {"type": "STRING", "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_source.stg_apple_search_ads__campaign_history_tmp"}, "model.apple_search_ads_source.stg_apple_search_ads__ad_history_tmp": {"metadata": {"type": "view", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "name": "stg_apple_search_ads__ad_history_tmp", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"creation_time": {"type": "TIMESTAMP", "index": 1, "name": "creation_time", "comment": null}, "modification_time": {"type": "TIMESTAMP", "index": 2, "name": "modification_time", "comment": null}, "org_id": {"type": "INT64", "index": 3, "name": "org_id", "comment": null}, "campaign_id": {"type": "INT64", "index": 4, "name": "campaign_id", "comment": null}, "ad_group_id": {"type": "INT64", "index": 5, "name": "ad_group_id", "comment": null}, "name": {"type": "STRING", "index": 6, "name": "name", "comment": null}, "id": {"type": "INT64", "index": 7, "name": "id", "comment": null}, "creative_id": {"type": "INT64", "index": 8, "name": "creative_id", "comment": null}, "creative_type": {"type": "STRING", "index": 9, "name": "creative_type", "comment": null}, "status": {"type": "STRING", "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_source.stg_apple_search_ads__ad_history_tmp"}, "model.apple_search_ads_source.stg_apple_search_ads__ad_group_report": {"metadata": {"type": "table", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "name": "stg_apple_search_ads__ad_group_report", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"date_day": {"type": "DATE", "index": 1, "name": "date_day", "comment": null}, "ad_group_id": {"type": "INT64", "index": 2, "name": "ad_group_id", "comment": null}, "impressions": {"type": "INT64", "index": 3, "name": "impressions", "comment": null}, "spend": {"type": "FLOAT64", "index": 4, "name": "spend", "comment": null}, "currency": {"type": "STRING", "index": 5, "name": "currency", "comment": null}, "new_downloads": {"type": "INT64", "index": 6, "name": "new_downloads", "comment": null}, "redownloads": {"type": "INT64", "index": 7, "name": "redownloads", "comment": null}, "taps": {"type": "INT64", "index": 8, "name": "taps", "comment": null}}, "stats": {"num_rows": {"id": "num_rows", "label": "# Rows", "value": 13.0, "include": true, "description": "Approximate count of rows in this table"}, "num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 793.0, "include": true, "description": "Approximate size of table as reported by BigQuery"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.apple_search_ads_source.stg_apple_search_ads__ad_group_report"}, "model.apple_search_ads_source.stg_apple_search_ads__ad_group_history": {"metadata": {"type": "table", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "name": "stg_apple_search_ads__ad_group_history", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"modified_at": {"type": "TIMESTAMP", "index": 1, "name": "modified_at", "comment": null}, "organization_id": {"type": "INT64", "index": 2, "name": "organization_id", "comment": null}, "campaign_id": {"type": "INT64", "index": 3, "name": "campaign_id", "comment": null}, "ad_group_name": {"type": "STRING", "index": 4, "name": "ad_group_name", "comment": null}, "ad_group_id": {"type": "INT64", "index": 5, "name": "ad_group_id", "comment": null}, "ad_group_status": {"type": "STRING", "index": 6, "name": "ad_group_status", "comment": null}, "start_at": {"type": "TIMESTAMP", "index": 7, "name": "start_at", "comment": null}, "end_at": {"type": "TIMESTAMP", "index": 8, "name": "end_at", "comment": null}, "is_most_recent_record": {"type": "BOOL", "index": 9, "name": "is_most_recent_record", "comment": null}}, "stats": {"num_rows": {"id": "num_rows", "label": "# Rows", "value": 4.0, "include": true, "description": "Approximate count of rows in this table"}, "num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 294.0, "include": true, "description": "Approximate size of table as reported by BigQuery"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.apple_search_ads_source.stg_apple_search_ads__ad_group_history"}, "model.apple_search_ads_source.stg_apple_search_ads__keyword_report": {"metadata": {"type": "table", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "name": "stg_apple_search_ads__keyword_report", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"date_day": {"type": "DATE", "index": 1, "name": "date_day", "comment": null}, "keyword_id": {"type": "INT64", "index": 2, "name": "keyword_id", "comment": null}, "impressions": {"type": "INT64", "index": 3, "name": "impressions", "comment": null}, "spend": {"type": "FLOAT64", "index": 4, "name": "spend", "comment": null}, "currency": {"type": "STRING", "index": 5, "name": "currency", "comment": null}, "new_downloads": {"type": "INT64", "index": 6, "name": "new_downloads", "comment": null}, "redownloads": {"type": "INT64", "index": 7, "name": "redownloads", "comment": null}, "taps": {"type": "INT64", "index": 8, "name": "taps", "comment": null}}, "stats": {"num_rows": {"id": "num_rows", "label": "# Rows", "value": 99.0, "include": true, "description": "Approximate count of rows in this table"}, "num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 6039.0, "include": true, "description": "Approximate size of table as reported by BigQuery"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.apple_search_ads_source.stg_apple_search_ads__keyword_report"}, "model.apple_search_ads_source.stg_apple_search_ads__campaign_history": {"metadata": {"type": "table", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "name": "stg_apple_search_ads__campaign_history", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"modified_at": {"type": "TIMESTAMP", "index": 1, "name": "modified_at", "comment": null}, "organization_id": {"type": "INT64", "index": 2, "name": "organization_id", "comment": null}, "campaign_name": {"type": "STRING", "index": 3, "name": "campaign_name", "comment": null}, "campaign_id": {"type": "INT64", "index": 4, "name": "campaign_id", "comment": null}, "campaign_status": {"type": "STRING", "index": 5, "name": "campaign_status", "comment": null}, "start_at": {"type": "TIMESTAMP", "index": 6, "name": "start_at", "comment": null}, "end_at": {"type": "TIMESTAMP", "index": 7, "name": "end_at", "comment": null}, "is_most_recent_record": {"type": "BOOL", "index": 8, "name": "is_most_recent_record", "comment": null}}, "stats": {"num_rows": {"id": "num_rows", "label": "# Rows", "value": 3.0, "include": true, "description": "Approximate count of rows in this table"}, "num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 179.0, "include": true, "description": "Approximate size of table as reported by BigQuery"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.apple_search_ads_source.stg_apple_search_ads__campaign_history"}, "model.apple_search_ads_source.stg_apple_search_ads__keyword_history": {"metadata": {"type": "table", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "name": "stg_apple_search_ads__keyword_history", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"modified_at": {"type": "TIMESTAMP", "index": 1, "name": "modified_at", "comment": null}, "campaign_id": {"type": "INT64", "index": 2, "name": "campaign_id", "comment": null}, "ad_group_id": {"type": "INT64", "index": 3, "name": "ad_group_id", "comment": null}, "keyword_id": {"type": "INT64", "index": 4, "name": "keyword_id", "comment": null}, "bid_amount": {"type": "FLOAT64", "index": 5, "name": "bid_amount", "comment": null}, "bid_currency": {"type": "STRING", "index": 6, "name": "bid_currency", "comment": null}, "match_type": {"type": "STRING", "index": 7, "name": "match_type", "comment": null}, "keyword_status": {"type": "STRING", "index": 8, "name": "keyword_status", "comment": null}, "keyword_text": {"type": "STRING", "index": 9, "name": "keyword_text", "comment": null}, "is_most_recent_record": {"type": "BOOL", "index": 10, "name": "is_most_recent_record", "comment": null}}, "stats": {"num_rows": {"id": "num_rows", "label": "# Rows", "value": 16.0, "include": true, "description": "Approximate count of rows in this table"}, "num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 1151.0, "include": true, "description": "Approximate size of table as reported by BigQuery"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.apple_search_ads_source.stg_apple_search_ads__keyword_history"}, "model.apple_search_ads_source.stg_apple_search_ads__keyword_history_tmp": {"metadata": {"type": "view", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "name": "stg_apple_search_ads__keyword_history_tmp", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"id": {"type": "INT64", "index": 1, "name": "id", "comment": null}, "modification_time": {"type": "TIMESTAMP", "index": 2, "name": "modification_time", "comment": null}, "ad_group_id": {"type": "INT64", "index": 3, "name": "ad_group_id", "comment": null}, "bid_amount": {"type": "FLOAT64", "index": 4, "name": "bid_amount", "comment": null}, "bid_currency": {"type": "STRING", "index": 5, "name": "bid_currency", "comment": null}, "campaign_id": {"type": "INT64", "index": 6, "name": "campaign_id", "comment": null}, "deleted": {"type": "BOOL", "index": 7, "name": "deleted", "comment": null}, "match_type": {"type": "STRING", "index": 8, "name": "match_type", "comment": null}, "status": {"type": "STRING", "index": 9, "name": "status", "comment": null}, "text": {"type": "STRING", "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_source.stg_apple_search_ads__keyword_history_tmp"}, "model.apple_search_ads_source.stg_apple_search_ads__campaign_report_tmp": {"metadata": {"type": "view", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "name": "stg_apple_search_ads__campaign_report_tmp", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"date": {"type": "DATE", "index": 1, "name": "date", "comment": null}, "id": {"type": "INT64", "index": 2, "name": "id", "comment": null}, "avg_cpa_amount": {"type": "FLOAT64", "index": 3, "name": "avg_cpa_amount", "comment": null}, "avg_cpa_currency": {"type": "STRING", "index": 4, "name": "avg_cpa_currency", "comment": null}, "avg_cpt_amount": {"type": "FLOAT64", "index": 5, "name": "avg_cpt_amount", "comment": null}, "avg_cpt_currency": {"type": "STRING", "index": 6, "name": "avg_cpt_currency", "comment": null}, "conversion_rate": {"type": "FLOAT64", "index": 7, "name": "conversion_rate", "comment": null}, "conversions": {"type": "INT64", "index": 8, "name": "conversions", "comment": null}, "impressions": {"type": "INT64", "index": 9, "name": "impressions", "comment": null}, "lat_off_installs": {"type": "INT64", "index": 10, "name": "lat_off_installs", "comment": null}, "lat_on_installs": {"type": "INT64", "index": 11, "name": "lat_on_installs", "comment": null}, "local_spend_amount": {"type": "FLOAT64", "index": 12, "name": "local_spend_amount", "comment": null}, "local_spend_currency": {"type": "STRING", "index": 13, "name": "local_spend_currency", "comment": null}, "new_downloads": {"type": "INT64", "index": 14, "name": "new_downloads", "comment": null}, "redownloads": {"type": "INT64", "index": 15, "name": "redownloads", "comment": null}, "tap_through_rate": {"type": "FLOAT64", "index": 16, "name": "tap_through_rate", "comment": null}, "taps": {"type": "INT64", "index": 17, "name": "taps", "comment": null}}, "stats": {"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_source.stg_apple_search_ads__campaign_report_tmp"}, "model.apple_search_ads_source.stg_apple_search_ads__ad_history": {"metadata": {"type": "table", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "name": "stg_apple_search_ads__ad_history", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"created_at": {"type": "TIMESTAMP", "index": 1, "name": "created_at", "comment": null}, "modified_at": {"type": "TIMESTAMP", "index": 2, "name": "modified_at", "comment": null}, "organization_id": {"type": "INT64", "index": 3, "name": "organization_id", "comment": null}, "campaign_id": {"type": "INT64", "index": 4, "name": "campaign_id", "comment": null}, "ad_group_id": {"type": "INT64", "index": 5, "name": "ad_group_id", "comment": null}, "ad_name": {"type": "STRING", "index": 6, "name": "ad_name", "comment": null}, "ad_id": {"type": "INT64", "index": 7, "name": "ad_id", "comment": null}, "ad_status": {"type": "STRING", "index": 8, "name": "ad_status", "comment": null}, "is_most_recent_record": {"type": "BOOL", "index": 9, "name": "is_most_recent_record", "comment": null}}, "stats": {"num_rows": {"id": "num_rows", "label": "# Rows", "value": 1.0, "include": true, "description": "Approximate count of rows in this table"}, "num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 73.0, "include": true, "description": "Approximate size of table as reported by BigQuery"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.apple_search_ads_source.stg_apple_search_ads__ad_history"}, "seed.apple_search_ads_integration_tests.ad_group_report_data": {"metadata": {"type": "table", "schema": "apple_search_ads_integration_tests", "name": "ad_group_report_data", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"ad_group_id": {"type": "INT64", "index": 1, "name": "ad_group_id", "comment": null}, "date": {"type": "DATE", "index": 2, "name": "date", "comment": null}, "avg_cpa_amount": {"type": "FLOAT64", "index": 3, "name": "avg_cpa_amount", "comment": null}, "avg_cpa_currency": {"type": "STRING", "index": 4, "name": "avg_cpa_currency", "comment": null}, "avg_cpt_amount": {"type": "FLOAT64", "index": 5, "name": "avg_cpt_amount", "comment": null}, "avg_cpt_currency": {"type": "STRING", "index": 6, "name": "avg_cpt_currency", "comment": null}, "conversion_rate": {"type": "FLOAT64", "index": 7, "name": "conversion_rate", "comment": null}, "conversions": {"type": "INT64", "index": 8, "name": "conversions", "comment": null}, "impressions": {"type": "INT64", "index": 9, "name": "impressions", "comment": null}, "lat_off_installs": {"type": "INT64", "index": 10, "name": "lat_off_installs", "comment": null}, "lat_on_installs": {"type": "INT64", "index": 11, "name": "lat_on_installs", "comment": null}, "local_spend_amount": {"type": "FLOAT64", "index": 12, "name": "local_spend_amount", "comment": null}, "local_spend_currency": {"type": "STRING", "index": 13, "name": "local_spend_currency", "comment": null}, "new_downloads": {"type": "INT64", "index": 14, "name": "new_downloads", "comment": null}, "redownloads": {"type": "INT64", "index": 15, "name": "redownloads", "comment": null}, "tap_through_rate": {"type": "FLOAT64", "index": 16, "name": "tap_through_rate", "comment": null}, "taps": {"type": "INT64", "index": 17, "name": "taps", "comment": null}}, "stats": {"num_rows": {"id": "num_rows", "label": "# Rows", "value": 13.0, "include": true, "description": "Approximate count of rows in this table"}, "num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 1651.0, "include": true, "description": "Approximate size of table as reported by BigQuery"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.apple_search_ads_integration_tests.ad_group_report_data"}, "seed.apple_search_ads_integration_tests.search_term_report_data": {"metadata": {"type": "table", "schema": "apple_search_ads_integration_tests", "name": "search_term_report_data", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"_fivetran_id": {"type": "STRING", "index": 1, "name": "_fivetran_id", "comment": null}, "ad_group_id": {"type": "INT64", "index": 2, "name": "ad_group_id", "comment": null}, "campaign_id": {"type": "INT64", "index": 3, "name": "campaign_id", "comment": null}, "date": {"type": "DATE", "index": 4, "name": "date", "comment": null}, "ad_group_deleted": {"type": "BOOL", "index": 5, "name": "ad_group_deleted", "comment": null}, "ad_group_name": {"type": "STRING", "index": 6, "name": "ad_group_name", "comment": null}, "avg_cpa_amount": {"type": "FLOAT64", "index": 7, "name": "avg_cpa_amount", "comment": null}, "avg_cpa_currency": {"type": "STRING", "index": 8, "name": "avg_cpa_currency", "comment": null}, "avg_cpt_amount": {"type": "FLOAT64", "index": 9, "name": "avg_cpt_amount", "comment": null}, "avg_cpt_currency": {"type": "STRING", "index": 10, "name": "avg_cpt_currency", "comment": null}, "bid_amount_amount": {"type": "FLOAT64", "index": 11, "name": "bid_amount_amount", "comment": null}, "bid_amount_currency": {"type": "STRING", "index": 12, "name": "bid_amount_currency", "comment": null}, "conversion_rate": {"type": "FLOAT64", "index": 13, "name": "conversion_rate", "comment": null}, "conversions": {"type": "INT64", "index": 14, "name": "conversions", "comment": null}, "deleted": {"type": "BOOL", "index": 15, "name": "deleted", "comment": null}, "impressions": {"type": "INT64", "index": 16, "name": "impressions", "comment": null}, "keyword": {"type": "STRING", "index": 17, "name": "keyword", "comment": null}, "keyword_display_status": {"type": "STRING", "index": 18, "name": "keyword_display_status", "comment": null}, "keyword_id": {"type": "INT64", "index": 19, "name": "keyword_id", "comment": null}, "lat_off_installs": {"type": "INT64", "index": 20, "name": "lat_off_installs", "comment": null}, "lat_on_installs": {"type": "INT64", "index": 21, "name": "lat_on_installs", "comment": null}, "local_spend_amount": {"type": "FLOAT64", "index": 22, "name": "local_spend_amount", "comment": null}, "local_spend_currency": {"type": "STRING", "index": 23, "name": "local_spend_currency", "comment": null}, "match_type": {"type": "STRING", "index": 24, "name": "match_type", "comment": null}, "new_downloads": {"type": "INT64", "index": 25, "name": "new_downloads", "comment": null}, "redownloads": {"type": "INT64", "index": 26, "name": "redownloads", "comment": null}, "search_term_source": {"type": "STRING", "index": 27, "name": "search_term_source", "comment": null}, "search_term_text": {"type": "STRING", "index": 28, "name": "search_term_text", "comment": null}, "tap_through_rate": {"type": "FLOAT64", "index": 29, "name": "tap_through_rate", "comment": null}, "taps": {"type": "INT64", "index": 30, "name": "taps", "comment": null}}, "stats": {"num_rows": {"id": "num_rows", "label": "# Rows", "value": 150.0, "include": true, "description": "Approximate count of rows in this table"}, "num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 35485.0, "include": true, "description": "Approximate size of table as reported by BigQuery"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.apple_search_ads_integration_tests.search_term_report_data"}, "seed.apple_search_ads_integration_tests.ad_report_data": {"metadata": {"type": "table", "schema": "apple_search_ads_integration_tests", "name": "ad_report_data", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"date": {"type": "DATE", "index": 1, "name": "date", "comment": null}, "_fivetran_synced": {"type": "TIMESTAMP", "index": 2, "name": "_fivetran_synced", "comment": null}, "campaign_id": {"type": "INT64", "index": 3, "name": "campaign_id", "comment": null}, "ad_group_id": {"type": "INT64", "index": 4, "name": "ad_group_id", "comment": null}, "ad_id": {"type": "INT64", "index": 5, "name": "ad_id", "comment": null}, "impressions": {"type": "INT64", "index": 6, "name": "impressions", "comment": null}, "local_spend_amount": {"type": "FLOAT64", "index": 7, "name": "local_spend_amount", "comment": null}, "local_spend_currency": {"type": "STRING", "index": 8, "name": "local_spend_currency", "comment": null}, "new_downloads": {"type": "INT64", "index": 9, "name": "new_downloads", "comment": null}, "redownloads": {"type": "INT64", "index": 10, "name": "redownloads", "comment": null}, "taps": {"type": "INT64", "index": 11, "name": "taps", "comment": null}}, "stats": {"num_rows": {"id": "num_rows", "label": "# Rows", "value": 2.0, "include": true, "description": "Approximate count of rows in this table"}, "num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 170.0, "include": true, "description": "Approximate size of table as reported by BigQuery"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.apple_search_ads_integration_tests.ad_report_data"}, "seed.apple_search_ads_integration_tests.campaign_history_data": {"metadata": {"type": "table", "schema": "apple_search_ads_integration_tests", "name": "campaign_history_data", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"id": {"type": "INT64", "index": 1, "name": "id", "comment": null}, "modification_time": {"type": "TIMESTAMP", "index": 2, "name": "modification_time", "comment": null}, "adam_id": {"type": "INT64", "index": 3, "name": "adam_id", "comment": null}, "budget_amount": {"type": "INT64", "index": 4, "name": "budget_amount", "comment": null}, "budget_currency": {"type": "STRING", "index": 5, "name": "budget_currency", "comment": null}, "budget_orders": {"type": "STRING", "index": 6, "name": "budget_orders", "comment": null}, "daily_budget_amount": {"type": "INT64", "index": 7, "name": "daily_budget_amount", "comment": null}, "daily_budget_currency": {"type": "STRING", "index": 8, "name": "daily_budget_currency", "comment": null}, "deleted": {"type": "BOOL", "index": 9, "name": "deleted", "comment": null}, "end_time": {"type": "TIMESTAMP", "index": 10, "name": "end_time", "comment": null}, "loc_invoice_detail_buyer_email": {"type": "INT64", "index": 11, "name": "loc_invoice_detail_buyer_email", "comment": null}, "loc_invoice_detail_buyer_name": {"type": "INT64", "index": 12, "name": "loc_invoice_detail_buyer_name", "comment": null}, "loc_invoice_detail_client_name": {"type": "INT64", "index": 13, "name": "loc_invoice_detail_client_name", "comment": null}, "loc_invoice_detail_order_number": {"type": "INT64", "index": 14, "name": "loc_invoice_detail_order_number", "comment": null}, "name": {"type": "STRING", "index": 15, "name": "name", "comment": null}, "organization_id": {"type": "INT64", "index": 16, "name": "organization_id", "comment": null}, "payment_model": {"type": "STRING", "index": 17, "name": "payment_model", "comment": null}, "serving_state_reasons": {"type": "STRING", "index": 18, "name": "serving_state_reasons", "comment": null}, "serving_status": {"type": "STRING", "index": 19, "name": "serving_status", "comment": null}, "start_time": {"type": "TIMESTAMP", "index": 20, "name": "start_time", "comment": null}, "status": {"type": "STRING", "index": 21, "name": "status", "comment": null}}, "stats": {"num_rows": {"id": "num_rows", "label": "# Rows", "value": 3.0, "include": true, "description": "Approximate count of rows in this table"}, "num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 419.0, "include": true, "description": "Approximate size of table as reported by BigQuery"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.apple_search_ads_integration_tests.campaign_history_data"}, "seed.apple_search_ads_integration_tests.campaign_report_data": {"metadata": {"type": "table", "schema": "apple_search_ads_integration_tests", "name": "campaign_report_data", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"date": {"type": "DATE", "index": 1, "name": "date", "comment": null}, "id": {"type": "INT64", "index": 2, "name": "id", "comment": null}, "avg_cpa_amount": {"type": "FLOAT64", "index": 3, "name": "avg_cpa_amount", "comment": null}, "avg_cpa_currency": {"type": "STRING", "index": 4, "name": "avg_cpa_currency", "comment": null}, "avg_cpt_amount": {"type": "FLOAT64", "index": 5, "name": "avg_cpt_amount", "comment": null}, "avg_cpt_currency": {"type": "STRING", "index": 6, "name": "avg_cpt_currency", "comment": null}, "conversion_rate": {"type": "FLOAT64", "index": 7, "name": "conversion_rate", "comment": null}, "conversions": {"type": "INT64", "index": 8, "name": "conversions", "comment": null}, "impressions": {"type": "INT64", "index": 9, "name": "impressions", "comment": null}, "lat_off_installs": {"type": "INT64", "index": 10, "name": "lat_off_installs", "comment": null}, "lat_on_installs": {"type": "INT64", "index": 11, "name": "lat_on_installs", "comment": null}, "local_spend_amount": {"type": "FLOAT64", "index": 12, "name": "local_spend_amount", "comment": null}, "local_spend_currency": {"type": "STRING", "index": 13, "name": "local_spend_currency", "comment": null}, "new_downloads": {"type": "INT64", "index": 14, "name": "new_downloads", "comment": null}, "redownloads": {"type": "INT64", "index": 15, "name": "redownloads", "comment": null}, "tap_through_rate": {"type": "FLOAT64", "index": 16, "name": "tap_through_rate", "comment": null}, "taps": {"type": "INT64", "index": 17, "name": "taps", "comment": null}}, "stats": {"num_rows": {"id": "num_rows", "label": "# Rows", "value": 12.0, "include": true, "description": "Approximate count of rows in this table"}, "num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 1524.0, "include": true, "description": "Approximate size of table as reported by BigQuery"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.apple_search_ads_integration_tests.campaign_report_data"}, "seed.apple_search_ads_integration_tests.keyword_history_data": {"metadata": {"type": "table", "schema": "apple_search_ads_integration_tests", "name": "keyword_history_data", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"id": {"type": "INT64", "index": 1, "name": "id", "comment": null}, "modification_time": {"type": "TIMESTAMP", "index": 2, "name": "modification_time", "comment": null}, "ad_group_id": {"type": "INT64", "index": 3, "name": "ad_group_id", "comment": null}, "bid_amount": {"type": "FLOAT64", "index": 4, "name": "bid_amount", "comment": null}, "bid_currency": {"type": "STRING", "index": 5, "name": "bid_currency", "comment": null}, "campaign_id": {"type": "INT64", "index": 6, "name": "campaign_id", "comment": null}, "deleted": {"type": "BOOL", "index": 7, "name": "deleted", "comment": null}, "match_type": {"type": "STRING", "index": 8, "name": "match_type", "comment": null}, "status": {"type": "STRING", "index": 9, "name": "status", "comment": null}, "text": {"type": "STRING", "index": 10, "name": "text", "comment": null}}, "stats": {"num_rows": {"id": "num_rows", "label": "# Rows", "value": 16.0, "include": true, "description": "Approximate count of rows in this table"}, "num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 1151.0, "include": true, "description": "Approximate size of table as reported by BigQuery"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.apple_search_ads_integration_tests.keyword_history_data"}, "seed.apple_search_ads_integration_tests.ad_history_data": {"metadata": {"type": "table", "schema": "apple_search_ads_integration_tests", "name": "ad_history_data", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"creation_time": {"type": "TIMESTAMP", "index": 1, "name": "creation_time", "comment": null}, "modification_time": {"type": "TIMESTAMP", "index": 2, "name": "modification_time", "comment": null}, "org_id": {"type": "INT64", "index": 3, "name": "org_id", "comment": null}, "campaign_id": {"type": "INT64", "index": 4, "name": "campaign_id", "comment": null}, "ad_group_id": {"type": "INT64", "index": 5, "name": "ad_group_id", "comment": null}, "name": {"type": "STRING", "index": 6, "name": "name", "comment": null}, "id": {"type": "INT64", "index": 7, "name": "id", "comment": null}, "creative_id": {"type": "INT64", "index": 8, "name": "creative_id", "comment": null}, "creative_type": {"type": "STRING", "index": 9, "name": "creative_type", "comment": null}, "status": {"type": "STRING", "index": 10, "name": "status", "comment": null}}, "stats": {"num_rows": {"id": "num_rows", "label": "# Rows", "value": 1.0, "include": true, "description": "Approximate count of rows in this table"}, "num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 101.0, "include": true, "description": "Approximate size of table as reported by BigQuery"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.apple_search_ads_integration_tests.ad_history_data"}, "seed.apple_search_ads_integration_tests.keyword_report_data": {"metadata": {"type": "table", "schema": "apple_search_ads_integration_tests", "name": "keyword_report_data", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"date": {"type": "DATE", "index": 1, "name": "date", "comment": null}, "id": {"type": "INT64", "index": 2, "name": "id", "comment": null}, "avg_cpa_amount": {"type": "FLOAT64", "index": 3, "name": "avg_cpa_amount", "comment": null}, "avg_cpa_currency": {"type": "STRING", "index": 4, "name": "avg_cpa_currency", "comment": null}, "avg_cpt_amount": {"type": "FLOAT64", "index": 5, "name": "avg_cpt_amount", "comment": null}, "avg_cpt_currency": {"type": "STRING", "index": 6, "name": "avg_cpt_currency", "comment": null}, "conversion_rate": {"type": "FLOAT64", "index": 7, "name": "conversion_rate", "comment": null}, "conversions": {"type": "INT64", "index": 8, "name": "conversions", "comment": null}, "impressions": {"type": "INT64", "index": 9, "name": "impressions", "comment": null}, "lat_off_installs": {"type": "INT64", "index": 10, "name": "lat_off_installs", "comment": null}, "lat_on_installs": {"type": "INT64", "index": 11, "name": "lat_on_installs", "comment": null}, "local_spend_amount": {"type": "FLOAT64", "index": 12, "name": "local_spend_amount", "comment": null}, "local_spend_currency": {"type": "STRING", "index": 13, "name": "local_spend_currency", "comment": null}, "new_downloads": {"type": "INT64", "index": 14, "name": "new_downloads", "comment": null}, "redownloads": {"type": "INT64", "index": 15, "name": "redownloads", "comment": null}, "tap_through_rate": {"type": "FLOAT64", "index": 16, "name": "tap_through_rate", "comment": null}, "taps": {"type": "INT64", "index": 17, "name": "taps", "comment": null}}, "stats": {"num_rows": {"id": "num_rows", "label": "# Rows", "value": 99.0, "include": true, "description": "Approximate count of rows in this table"}, "num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 12573.0, "include": true, "description": "Approximate size of table as reported by BigQuery"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.apple_search_ads_integration_tests.keyword_report_data"}, "seed.apple_search_ads_integration_tests.ad_group_history_data": {"metadata": {"type": "table", "schema": "apple_search_ads_integration_tests", "name": "ad_group_history_data", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"id": {"type": "INT64", "index": 1, "name": "id", "comment": null}, "modification_time": {"type": "TIMESTAMP", "index": 2, "name": "modification_time", "comment": null}, "automated_keywords_opt_in": {"type": "BOOL", "index": 3, "name": "automated_keywords_opt_in", "comment": null}, "campaign_id": {"type": "INT64", "index": 4, "name": "campaign_id", "comment": null}, "cpa_goal_amount": {"type": "INT64", "index": 5, "name": "cpa_goal_amount", "comment": null}, "cpa_goal_currency": {"type": "INT64", "index": 6, "name": "cpa_goal_currency", "comment": null}, "default_cpc_bid_amount": {"type": "INT64", "index": 7, "name": "default_cpc_bid_amount", "comment": null}, "default_cpc_bid_currency": {"type": "INT64", "index": 8, "name": "default_cpc_bid_currency", "comment": null}, "deleted": {"type": "BOOL", "index": 9, "name": "deleted", "comment": null}, "end_time": {"type": "TIMESTAMP", "index": 10, "name": "end_time", "comment": null}, "name": {"type": "STRING", "index": 11, "name": "name", "comment": null}, "organization_id": {"type": "INT64", "index": 12, "name": "organization_id", "comment": null}, "serving_state_reasons": {"type": "INT64", "index": 13, "name": "serving_state_reasons", "comment": null}, "serving_status": {"type": "STRING", "index": 14, "name": "serving_status", "comment": null}, "start_time": {"type": "TIMESTAMP", "index": 15, "name": "start_time", "comment": null}, "status": {"type": "STRING", "index": 16, "name": "status", "comment": null}, "storefronts": {"type": "INT64", "index": 17, "name": "storefronts", "comment": null}}, "stats": {"num_rows": {"id": "num_rows", "label": "# Rows", "value": 4.0, "include": true, "description": "Approximate count of rows in this table"}, "num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 334.0, "include": true, "description": "Approximate size of table as reported by BigQuery"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.apple_search_ads_integration_tests.ad_group_history_data"}, "seed.apple_search_ads_integration_tests.organization_data": {"metadata": {"type": "table", "schema": "apple_search_ads_integration_tests", "name": "organization_data", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"id": {"type": "INT64", "index": 1, "name": "id", "comment": null}, "currency": {"type": "STRING", "index": 2, "name": "currency", "comment": null}, "name": {"type": "STRING", "index": 3, "name": "name", "comment": null}, "payment_model": {"type": "STRING", "index": 4, "name": "payment_model", "comment": null}, "role_names": {"type": "STRING", "index": 5, "name": "role_names", "comment": null}, "time_zone": {"type": "STRING", "index": 6, "name": "time_zone", "comment": null}}, "stats": {"num_rows": {"id": "num_rows", "label": "# Rows", "value": 2.0, "include": true, "description": "Approximate count of rows in this table"}, "num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 132.0, "include": true, "description": "Approximate size of table as reported by BigQuery"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.apple_search_ads_integration_tests.organization_data"}}, "sources": {"source.apple_search_ads_source.apple_search_ads.ad_group_report": {"metadata": {"type": "table", "schema": "apple_search_ads_integration_tests", "name": "ad_group_report_data", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"ad_group_id": {"type": "INT64", "index": 1, "name": "ad_group_id", "comment": null}, "date": {"type": "DATE", "index": 2, "name": "date", "comment": null}, "avg_cpa_amount": {"type": "FLOAT64", "index": 3, "name": "avg_cpa_amount", "comment": null}, "avg_cpa_currency": {"type": "STRING", "index": 4, "name": "avg_cpa_currency", "comment": null}, "avg_cpt_amount": {"type": "FLOAT64", "index": 5, "name": "avg_cpt_amount", "comment": null}, "avg_cpt_currency": {"type": "STRING", "index": 6, "name": "avg_cpt_currency", "comment": null}, "conversion_rate": {"type": "FLOAT64", "index": 7, "name": "conversion_rate", "comment": null}, "conversions": {"type": "INT64", "index": 8, "name": "conversions", "comment": null}, "impressions": {"type": "INT64", "index": 9, "name": "impressions", "comment": null}, "lat_off_installs": {"type": "INT64", "index": 10, "name": "lat_off_installs", "comment": null}, "lat_on_installs": {"type": "INT64", "index": 11, "name": "lat_on_installs", "comment": null}, "local_spend_amount": {"type": "FLOAT64", "index": 12, "name": "local_spend_amount", "comment": null}, "local_spend_currency": {"type": "STRING", "index": 13, "name": "local_spend_currency", "comment": null}, "new_downloads": {"type": "INT64", "index": 14, "name": "new_downloads", "comment": null}, "redownloads": {"type": "INT64", "index": 15, "name": "redownloads", "comment": null}, "tap_through_rate": {"type": "FLOAT64", "index": 16, "name": "tap_through_rate", "comment": null}, "taps": {"type": "INT64", "index": 17, "name": "taps", "comment": null}}, "stats": {"num_rows": {"id": "num_rows", "label": "# Rows", "value": 13.0, "include": true, "description": "Approximate count of rows in this table"}, "num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 1651.0, "include": true, "description": "Approximate size of table as reported by BigQuery"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.apple_search_ads_source.apple_search_ads.ad_group_report"}, "source.apple_search_ads_source.apple_search_ads.search_term_report": {"metadata": {"type": "table", "schema": "apple_search_ads_integration_tests", "name": "search_term_report_data", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"_fivetran_id": {"type": "STRING", "index": 1, "name": "_fivetran_id", "comment": null}, "ad_group_id": {"type": "INT64", "index": 2, "name": "ad_group_id", "comment": null}, "campaign_id": {"type": "INT64", "index": 3, "name": "campaign_id", "comment": null}, "date": {"type": "DATE", "index": 4, "name": "date", "comment": null}, "ad_group_deleted": {"type": "BOOL", "index": 5, "name": "ad_group_deleted", "comment": null}, "ad_group_name": {"type": "STRING", "index": 6, "name": "ad_group_name", "comment": null}, "avg_cpa_amount": {"type": "FLOAT64", "index": 7, "name": "avg_cpa_amount", "comment": null}, "avg_cpa_currency": {"type": "STRING", "index": 8, "name": "avg_cpa_currency", "comment": null}, "avg_cpt_amount": {"type": "FLOAT64", "index": 9, "name": "avg_cpt_amount", "comment": null}, "avg_cpt_currency": {"type": "STRING", "index": 10, "name": "avg_cpt_currency", "comment": null}, "bid_amount_amount": {"type": "FLOAT64", "index": 11, "name": "bid_amount_amount", "comment": null}, "bid_amount_currency": {"type": "STRING", "index": 12, "name": "bid_amount_currency", "comment": null}, "conversion_rate": {"type": "FLOAT64", "index": 13, "name": "conversion_rate", "comment": null}, "conversions": {"type": "INT64", "index": 14, "name": "conversions", "comment": null}, "deleted": {"type": "BOOL", "index": 15, "name": "deleted", "comment": null}, "impressions": {"type": "INT64", "index": 16, "name": "impressions", "comment": null}, "keyword": {"type": "STRING", "index": 17, "name": "keyword", "comment": null}, "keyword_display_status": {"type": "STRING", "index": 18, "name": "keyword_display_status", "comment": null}, "keyword_id": {"type": "INT64", "index": 19, "name": "keyword_id", "comment": null}, "lat_off_installs": {"type": "INT64", "index": 20, "name": "lat_off_installs", "comment": null}, "lat_on_installs": {"type": "INT64", "index": 21, "name": "lat_on_installs", "comment": null}, "local_spend_amount": {"type": "FLOAT64", "index": 22, "name": "local_spend_amount", "comment": null}, "local_spend_currency": {"type": "STRING", "index": 23, "name": "local_spend_currency", "comment": null}, "match_type": {"type": "STRING", "index": 24, "name": "match_type", "comment": null}, "new_downloads": {"type": "INT64", "index": 25, "name": "new_downloads", "comment": null}, "redownloads": {"type": "INT64", "index": 26, "name": "redownloads", "comment": null}, "search_term_source": {"type": "STRING", "index": 27, "name": "search_term_source", "comment": null}, "search_term_text": {"type": "STRING", "index": 28, "name": "search_term_text", "comment": null}, "tap_through_rate": {"type": "FLOAT64", "index": 29, "name": "tap_through_rate", "comment": null}, "taps": {"type": "INT64", "index": 30, "name": "taps", "comment": null}}, "stats": {"num_rows": {"id": "num_rows", "label": "# Rows", "value": 150.0, "include": true, "description": "Approximate count of rows in this table"}, "num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 35485.0, "include": true, "description": "Approximate size of table as reported by BigQuery"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.apple_search_ads_source.apple_search_ads.search_term_report"}, "source.apple_search_ads_source.apple_search_ads.ad_level_report": {"metadata": {"type": "table", "schema": "apple_search_ads_integration_tests", "name": "ad_report_data", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"date": {"type": "DATE", "index": 1, "name": "date", "comment": null}, "_fivetran_synced": {"type": "TIMESTAMP", "index": 2, "name": "_fivetran_synced", "comment": null}, "campaign_id": {"type": "INT64", "index": 3, "name": "campaign_id", "comment": null}, "ad_group_id": {"type": "INT64", "index": 4, "name": "ad_group_id", "comment": null}, "ad_id": {"type": "INT64", "index": 5, "name": "ad_id", "comment": null}, "impressions": {"type": "INT64", "index": 6, "name": "impressions", "comment": null}, "local_spend_amount": {"type": "FLOAT64", "index": 7, "name": "local_spend_amount", "comment": null}, "local_spend_currency": {"type": "STRING", "index": 8, "name": "local_spend_currency", "comment": null}, "new_downloads": {"type": "INT64", "index": 9, "name": "new_downloads", "comment": null}, "redownloads": {"type": "INT64", "index": 10, "name": "redownloads", "comment": null}, "taps": {"type": "INT64", "index": 11, "name": "taps", "comment": null}}, "stats": {"num_rows": {"id": "num_rows", "label": "# Rows", "value": 2.0, "include": true, "description": "Approximate count of rows in this table"}, "num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 170.0, "include": true, "description": "Approximate size of table as reported by BigQuery"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.apple_search_ads_source.apple_search_ads.ad_level_report"}, "source.apple_search_ads_source.apple_search_ads.campaign_history": {"metadata": {"type": "table", "schema": "apple_search_ads_integration_tests", "name": "campaign_history_data", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"id": {"type": "INT64", "index": 1, "name": "id", "comment": null}, "modification_time": {"type": "TIMESTAMP", "index": 2, "name": "modification_time", "comment": null}, "adam_id": {"type": "INT64", "index": 3, "name": "adam_id", "comment": null}, "budget_amount": {"type": "INT64", "index": 4, "name": "budget_amount", "comment": null}, "budget_currency": {"type": "STRING", "index": 5, "name": "budget_currency", "comment": null}, "budget_orders": {"type": "STRING", "index": 6, "name": "budget_orders", "comment": null}, "daily_budget_amount": {"type": "INT64", "index": 7, "name": "daily_budget_amount", "comment": null}, "daily_budget_currency": {"type": "STRING", "index": 8, "name": "daily_budget_currency", "comment": null}, "deleted": {"type": "BOOL", "index": 9, "name": "deleted", "comment": null}, "end_time": {"type": "TIMESTAMP", "index": 10, "name": "end_time", "comment": null}, "loc_invoice_detail_buyer_email": {"type": "INT64", "index": 11, "name": "loc_invoice_detail_buyer_email", "comment": null}, "loc_invoice_detail_buyer_name": {"type": "INT64", "index": 12, "name": "loc_invoice_detail_buyer_name", "comment": null}, "loc_invoice_detail_client_name": {"type": "INT64", "index": 13, "name": "loc_invoice_detail_client_name", "comment": null}, "loc_invoice_detail_order_number": {"type": "INT64", "index": 14, "name": "loc_invoice_detail_order_number", "comment": null}, "name": {"type": "STRING", "index": 15, "name": "name", "comment": null}, "organization_id": {"type": "INT64", "index": 16, "name": "organization_id", "comment": null}, "payment_model": {"type": "STRING", "index": 17, "name": "payment_model", "comment": null}, "serving_state_reasons": {"type": "STRING", "index": 18, "name": "serving_state_reasons", "comment": null}, "serving_status": {"type": "STRING", "index": 19, "name": "serving_status", "comment": null}, "start_time": {"type": "TIMESTAMP", "index": 20, "name": "start_time", "comment": null}, "status": {"type": "STRING", "index": 21, "name": "status", "comment": null}}, "stats": {"num_rows": {"id": "num_rows", "label": "# Rows", "value": 3.0, "include": true, "description": "Approximate count of rows in this table"}, "num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 419.0, "include": true, "description": "Approximate size of table as reported by BigQuery"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.apple_search_ads_source.apple_search_ads.campaign_history"}, "source.apple_search_ads_source.apple_search_ads.campaign_report": {"metadata": {"type": "table", "schema": "apple_search_ads_integration_tests", "name": "campaign_report_data", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"date": {"type": "DATE", "index": 1, "name": "date", "comment": null}, "id": {"type": "INT64", "index": 2, "name": "id", "comment": null}, "avg_cpa_amount": {"type": "FLOAT64", "index": 3, "name": "avg_cpa_amount", "comment": null}, "avg_cpa_currency": {"type": "STRING", "index": 4, "name": "avg_cpa_currency", "comment": null}, "avg_cpt_amount": {"type": "FLOAT64", "index": 5, "name": "avg_cpt_amount", "comment": null}, "avg_cpt_currency": {"type": "STRING", "index": 6, "name": "avg_cpt_currency", "comment": null}, "conversion_rate": {"type": "FLOAT64", "index": 7, "name": "conversion_rate", "comment": null}, "conversions": {"type": "INT64", "index": 8, "name": "conversions", "comment": null}, "impressions": {"type": "INT64", "index": 9, "name": "impressions", "comment": null}, "lat_off_installs": {"type": "INT64", "index": 10, "name": "lat_off_installs", "comment": null}, "lat_on_installs": {"type": "INT64", "index": 11, "name": "lat_on_installs", "comment": null}, "local_spend_amount": {"type": "FLOAT64", "index": 12, "name": "local_spend_amount", "comment": null}, "local_spend_currency": {"type": "STRING", "index": 13, "name": "local_spend_currency", "comment": null}, "new_downloads": {"type": "INT64", "index": 14, "name": "new_downloads", "comment": null}, "redownloads": {"type": "INT64", "index": 15, "name": "redownloads", "comment": null}, "tap_through_rate": {"type": "FLOAT64", "index": 16, "name": "tap_through_rate", "comment": null}, "taps": {"type": "INT64", "index": 17, "name": "taps", "comment": null}}, "stats": {"num_rows": {"id": "num_rows", "label": "# Rows", "value": 12.0, "include": true, "description": "Approximate count of rows in this table"}, "num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 1524.0, "include": true, "description": "Approximate size of table as reported by BigQuery"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.apple_search_ads_source.apple_search_ads.campaign_report"}, "source.apple_search_ads_source.apple_search_ads.keyword_history": {"metadata": {"type": "table", "schema": "apple_search_ads_integration_tests", "name": "keyword_history_data", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"id": {"type": "INT64", "index": 1, "name": "id", "comment": null}, "modification_time": {"type": "TIMESTAMP", "index": 2, "name": "modification_time", "comment": null}, "ad_group_id": {"type": "INT64", "index": 3, "name": "ad_group_id", "comment": null}, "bid_amount": {"type": "FLOAT64", "index": 4, "name": "bid_amount", "comment": null}, "bid_currency": {"type": "STRING", "index": 5, "name": "bid_currency", "comment": null}, "campaign_id": {"type": "INT64", "index": 6, "name": "campaign_id", "comment": null}, "deleted": {"type": "BOOL", "index": 7, "name": "deleted", "comment": null}, "match_type": {"type": "STRING", "index": 8, "name": "match_type", "comment": null}, "status": {"type": "STRING", "index": 9, "name": "status", "comment": null}, "text": {"type": "STRING", "index": 10, "name": "text", "comment": null}}, "stats": {"num_rows": {"id": "num_rows", "label": "# Rows", "value": 16.0, "include": true, "description": "Approximate count of rows in this table"}, "num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 1151.0, "include": true, "description": "Approximate size of table as reported by BigQuery"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.apple_search_ads_source.apple_search_ads.keyword_history"}, "source.apple_search_ads_source.apple_search_ads.ad_history": {"metadata": {"type": "table", "schema": "apple_search_ads_integration_tests", "name": "ad_history_data", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"creation_time": {"type": "TIMESTAMP", "index": 1, "name": "creation_time", "comment": null}, "modification_time": {"type": "TIMESTAMP", "index": 2, "name": "modification_time", "comment": null}, "org_id": {"type": "INT64", "index": 3, "name": "org_id", "comment": null}, "campaign_id": {"type": "INT64", "index": 4, "name": "campaign_id", "comment": null}, "ad_group_id": {"type": "INT64", "index": 5, "name": "ad_group_id", "comment": null}, "name": {"type": "STRING", "index": 6, "name": "name", "comment": null}, "id": {"type": "INT64", "index": 7, "name": "id", "comment": null}, "creative_id": {"type": "INT64", "index": 8, "name": "creative_id", "comment": null}, "creative_type": {"type": "STRING", "index": 9, "name": "creative_type", "comment": null}, "status": {"type": "STRING", "index": 10, "name": "status", "comment": null}}, "stats": {"num_rows": {"id": "num_rows", "label": "# Rows", "value": 1.0, "include": true, "description": "Approximate count of rows in this table"}, "num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 101.0, "include": true, "description": "Approximate size of table as reported by BigQuery"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.apple_search_ads_source.apple_search_ads.ad_history"}, "source.apple_search_ads_source.apple_search_ads.keyword_report": {"metadata": {"type": "table", "schema": "apple_search_ads_integration_tests", "name": "keyword_report_data", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"date": {"type": "DATE", "index": 1, "name": "date", "comment": null}, "id": {"type": "INT64", "index": 2, "name": "id", "comment": null}, "avg_cpa_amount": {"type": "FLOAT64", "index": 3, "name": "avg_cpa_amount", "comment": null}, "avg_cpa_currency": {"type": "STRING", "index": 4, "name": "avg_cpa_currency", "comment": null}, "avg_cpt_amount": {"type": "FLOAT64", "index": 5, "name": "avg_cpt_amount", "comment": null}, "avg_cpt_currency": {"type": "STRING", "index": 6, "name": "avg_cpt_currency", "comment": null}, "conversion_rate": {"type": "FLOAT64", "index": 7, "name": "conversion_rate", "comment": null}, "conversions": {"type": "INT64", "index": 8, "name": "conversions", "comment": null}, "impressions": {"type": "INT64", "index": 9, "name": "impressions", "comment": null}, "lat_off_installs": {"type": "INT64", "index": 10, "name": "lat_off_installs", "comment": null}, "lat_on_installs": {"type": "INT64", "index": 11, "name": "lat_on_installs", "comment": null}, "local_spend_amount": {"type": "FLOAT64", "index": 12, "name": "local_spend_amount", "comment": null}, "local_spend_currency": {"type": "STRING", "index": 13, "name": "local_spend_currency", "comment": null}, "new_downloads": {"type": "INT64", "index": 14, "name": "new_downloads", "comment": null}, "redownloads": {"type": "INT64", "index": 15, "name": "redownloads", "comment": null}, "tap_through_rate": {"type": "FLOAT64", "index": 16, "name": "tap_through_rate", "comment": null}, "taps": {"type": "INT64", "index": 17, "name": "taps", "comment": null}}, "stats": {"num_rows": {"id": "num_rows", "label": "# Rows", "value": 99.0, "include": true, "description": "Approximate count of rows in this table"}, "num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 12573.0, "include": true, "description": "Approximate size of table as reported by BigQuery"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.apple_search_ads_source.apple_search_ads.keyword_report"}, "source.apple_search_ads_source.apple_search_ads.ad_group_history": {"metadata": {"type": "table", "schema": "apple_search_ads_integration_tests", "name": "ad_group_history_data", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"id": {"type": "INT64", "index": 1, "name": "id", "comment": null}, "modification_time": {"type": "TIMESTAMP", "index": 2, "name": "modification_time", "comment": null}, "automated_keywords_opt_in": {"type": "BOOL", "index": 3, "name": "automated_keywords_opt_in", "comment": null}, "campaign_id": {"type": "INT64", "index": 4, "name": "campaign_id", "comment": null}, "cpa_goal_amount": {"type": "INT64", "index": 5, "name": "cpa_goal_amount", "comment": null}, "cpa_goal_currency": {"type": "INT64", "index": 6, "name": "cpa_goal_currency", "comment": null}, "default_cpc_bid_amount": {"type": "INT64", "index": 7, "name": "default_cpc_bid_amount", "comment": null}, "default_cpc_bid_currency": {"type": "INT64", "index": 8, "name": "default_cpc_bid_currency", "comment": null}, "deleted": {"type": "BOOL", "index": 9, "name": "deleted", "comment": null}, "end_time": {"type": "TIMESTAMP", "index": 10, "name": "end_time", "comment": null}, "name": {"type": "STRING", "index": 11, "name": "name", "comment": null}, "organization_id": {"type": "INT64", "index": 12, "name": "organization_id", "comment": null}, "serving_state_reasons": {"type": "INT64", "index": 13, "name": "serving_state_reasons", "comment": null}, "serving_status": {"type": "STRING", "index": 14, "name": "serving_status", "comment": null}, "start_time": {"type": "TIMESTAMP", "index": 15, "name": "start_time", "comment": null}, "status": {"type": "STRING", "index": 16, "name": "status", "comment": null}, "storefronts": {"type": "INT64", "index": 17, "name": "storefronts", "comment": null}}, "stats": {"num_rows": {"id": "num_rows", "label": "# Rows", "value": 4.0, "include": true, "description": "Approximate count of rows in this table"}, "num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 334.0, "include": true, "description": "Approximate size of table as reported by BigQuery"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.apple_search_ads_source.apple_search_ads.ad_group_history"}, "source.apple_search_ads_source.apple_search_ads.organization": {"metadata": {"type": "table", "schema": "apple_search_ads_integration_tests", "name": "organization_data", "database": "dbt-package-testing", "comment": null, "owner": null}, "columns": {"id": {"type": "INT64", "index": 1, "name": "id", "comment": null}, "currency": {"type": "STRING", "index": 2, "name": "currency", "comment": null}, "name": {"type": "STRING", "index": 3, "name": "name", "comment": null}, "payment_model": {"type": "STRING", "index": 4, "name": "payment_model", "comment": null}, "role_names": {"type": "STRING", "index": 5, "name": "role_names", "comment": null}, "time_zone": {"type": "STRING", "index": 6, "name": "time_zone", "comment": null}}, "stats": {"num_rows": {"id": "num_rows", "label": "# Rows", "value": 2.0, "include": true, "description": "Approximate count of rows in this table"}, "num_bytes": {"id": "num_bytes", "label": "Approximate Size", "value": 132.0, "include": true, "description": "Approximate size of table as reported by BigQuery"}, "has_stats": {"id": "has_stats", "label": "Has Stats?", "value": true, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.apple_search_ads_source.apple_search_ads.organization"}}, "errors": null} \ No newline at end of file +{"metadata": {"dbt_schema_version": "https://schemas.getdbt.com/dbt/catalog/v1.json", "dbt_version": "1.3.0", "generated_at": "2022-12-20T03:04:53.501949Z", "invocation_id": "813fddce-ccfb-4c9e-be0f-4fb5725e66b7", "env": {}}, "nodes": {"seed.apple_search_ads_integration_tests.ad_group_history_data": {"metadata": {"type": "BASE TABLE", "schema": "apple_search_ads_integration_tests", "name": "ad_group_history_data", "database": "postgres", "comment": null, "owner": "pguser"}, "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.apple_search_ads_integration_tests.ad_group_history_data"}, "seed.apple_search_ads_integration_tests.ad_group_report_data": {"metadata": {"type": "BASE TABLE", "schema": "apple_search_ads_integration_tests", "name": "ad_group_report_data", "database": "postgres", "comment": null, "owner": "pguser"}, "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}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.apple_search_ads_integration_tests.ad_group_report_data"}, "seed.apple_search_ads_integration_tests.ad_history_data": {"metadata": {"type": "BASE TABLE", "schema": "apple_search_ads_integration_tests", "name": "ad_history_data", "database": "postgres", "comment": null, "owner": "pguser"}, "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.apple_search_ads_integration_tests.ad_history_data"}, "seed.apple_search_ads_integration_tests.ad_report_data": {"metadata": {"type": "BASE TABLE", "schema": "apple_search_ads_integration_tests", "name": "ad_report_data", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"date": {"type": "date", "index": 1, "name": "date", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "campaign_id": {"type": "integer", "index": 3, "name": "campaign_id", "comment": null}, "ad_group_id": {"type": "integer", "index": 4, "name": "ad_group_id", "comment": null}, "ad_id": {"type": "integer", "index": 5, "name": "ad_id", "comment": null}, "impressions": {"type": "integer", "index": 6, "name": "impressions", "comment": null}, "local_spend_amount": {"type": "double precision", "index": 7, "name": "local_spend_amount", "comment": null}, "local_spend_currency": {"type": "text", "index": 8, "name": "local_spend_currency", "comment": null}, "new_downloads": {"type": "integer", "index": 9, "name": "new_downloads", "comment": null}, "redownloads": {"type": "integer", "index": 10, "name": "redownloads", "comment": null}, "taps": {"type": "integer", "index": 11, "name": "taps", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.apple_search_ads_integration_tests.ad_report_data"}, "seed.apple_search_ads_integration_tests.campaign_history_data": {"metadata": {"type": "BASE TABLE", "schema": "apple_search_ads_integration_tests", "name": "campaign_history_data", "database": "postgres", "comment": null, "owner": "pguser"}, "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.apple_search_ads_integration_tests.campaign_history_data"}, "seed.apple_search_ads_integration_tests.campaign_report_data": {"metadata": {"type": "BASE TABLE", "schema": "apple_search_ads_integration_tests", "name": "campaign_report_data", "database": "postgres", "comment": null, "owner": "pguser"}, "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}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.apple_search_ads_integration_tests.campaign_report_data"}, "seed.apple_search_ads_integration_tests.keyword_history_data": {"metadata": {"type": "BASE TABLE", "schema": "apple_search_ads_integration_tests", "name": "keyword_history_data", "database": "postgres", "comment": null, "owner": "pguser"}, "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.apple_search_ads_integration_tests.keyword_history_data"}, "seed.apple_search_ads_integration_tests.keyword_report_data": {"metadata": {"type": "BASE TABLE", "schema": "apple_search_ads_integration_tests", "name": "keyword_report_data", "database": "postgres", "comment": null, "owner": "pguser"}, "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}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.apple_search_ads_integration_tests.keyword_report_data"}, "seed.apple_search_ads_integration_tests.organization_data": {"metadata": {"type": "BASE TABLE", "schema": "apple_search_ads_integration_tests", "name": "organization_data", "database": "postgres", "comment": null, "owner": "pguser"}, "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.apple_search_ads_integration_tests.organization_data"}, "seed.apple_search_ads_integration_tests.search_term_report_data": {"metadata": {"type": "BASE TABLE", "schema": "apple_search_ads_integration_tests", "name": "search_term_report_data", "database": "postgres", "comment": null, "owner": "pguser"}, "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}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.apple_search_ads_integration_tests.search_term_report_data"}, "model.apple_search_ads.apple_search_ads__ad_group_report": {"metadata": {"type": "BASE TABLE", "schema": "apple_search_ads_integration_tests_apple_search_ads", "name": "apple_search_ads__ad_group_report", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"date_day": {"type": "date", "index": 1, "name": "date_day", "comment": null}, "organization_id": {"type": "integer", "index": 2, "name": "organization_id", "comment": null}, "organization_name": {"type": "text", "index": 3, "name": "organization_name", "comment": null}, "campaign_id": {"type": "integer", "index": 4, "name": "campaign_id", "comment": null}, "campaign_name": {"type": "text", "index": 5, "name": "campaign_name", "comment": null}, "ad_group_id": {"type": "integer", "index": 6, "name": "ad_group_id", "comment": null}, "ad_group_name": {"type": "text", "index": 7, "name": "ad_group_name", "comment": null}, "currency": {"type": "text", "index": 8, "name": "currency", "comment": null}, "ad_group_status": {"type": "text", "index": 9, "name": "ad_group_status", "comment": null}, "start_at": {"type": "timestamp without time zone", "index": 10, "name": "start_at", "comment": null}, "end_at": {"type": "timestamp without time zone", "index": 11, "name": "end_at", "comment": null}, "taps": {"type": "bigint", "index": 12, "name": "taps", "comment": null}, "new_downloads": {"type": "bigint", "index": 13, "name": "new_downloads", "comment": null}, "redownloads": {"type": "bigint", "index": 14, "name": "redownloads", "comment": null}, "total_downloads": {"type": "bigint", "index": 15, "name": "total_downloads", "comment": null}, "impressions": {"type": "bigint", "index": 16, "name": "impressions", "comment": null}, "spend": {"type": "double precision", "index": 17, "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.apple_search_ads.apple_search_ads__ad_group_report"}, "model.apple_search_ads.apple_search_ads__ad_report": {"metadata": {"type": "BASE TABLE", "schema": "apple_search_ads_integration_tests_apple_search_ads", "name": "apple_search_ads__ad_report", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"date_day": {"type": "date", "index": 1, "name": "date_day", "comment": null}, "organization_id": {"type": "integer", "index": 2, "name": "organization_id", "comment": null}, "organization_name": {"type": "text", "index": 3, "name": "organization_name", "comment": null}, "campaign_id": {"type": "integer", "index": 4, "name": "campaign_id", "comment": null}, "campaign_name": {"type": "text", "index": 5, "name": "campaign_name", "comment": null}, "ad_group_id": {"type": "integer", "index": 6, "name": "ad_group_id", "comment": null}, "ad_group_name": {"type": "text", "index": 7, "name": "ad_group_name", "comment": null}, "ad_id": {"type": "integer", "index": 8, "name": "ad_id", "comment": null}, "ad_name": {"type": "text", "index": 9, "name": "ad_name", "comment": null}, "currency": {"type": "text", "index": 10, "name": "currency", "comment": null}, "ad_status": {"type": "text", "index": 11, "name": "ad_status", "comment": null}, "taps": {"type": "bigint", "index": 12, "name": "taps", "comment": null}, "new_downloads": {"type": "bigint", "index": 13, "name": "new_downloads", "comment": null}, "redownloads": {"type": "bigint", "index": 14, "name": "redownloads", "comment": null}, "total_downloads": {"type": "bigint", "index": 15, "name": "total_downloads", "comment": null}, "impressions": {"type": "bigint", "index": 16, "name": "impressions", "comment": null}, "spend": {"type": "double precision", "index": 17, "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.apple_search_ads.apple_search_ads__ad_report"}, "model.apple_search_ads.apple_search_ads__campaign_report": {"metadata": {"type": "BASE TABLE", "schema": "apple_search_ads_integration_tests_apple_search_ads", "name": "apple_search_ads__campaign_report", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"date_day": {"type": "date", "index": 1, "name": "date_day", "comment": null}, "organization_id": {"type": "integer", "index": 2, "name": "organization_id", "comment": null}, "organization_name": {"type": "text", "index": 3, "name": "organization_name", "comment": null}, "campaign_id": {"type": "integer", "index": 4, "name": "campaign_id", "comment": null}, "campaign_name": {"type": "text", "index": 5, "name": "campaign_name", "comment": null}, "currency": {"type": "text", "index": 6, "name": "currency", "comment": null}, "campaign_status": {"type": "text", "index": 7, "name": "campaign_status", "comment": null}, "start_at": {"type": "timestamp without time zone", "index": 8, "name": "start_at", "comment": null}, "end_at": {"type": "timestamp without time zone", "index": 9, "name": "end_at", "comment": null}, "taps": {"type": "bigint", "index": 10, "name": "taps", "comment": null}, "new_downloads": {"type": "bigint", "index": 11, "name": "new_downloads", "comment": null}, "redownloads": {"type": "bigint", "index": 12, "name": "redownloads", "comment": null}, "total_downloads": {"type": "bigint", "index": 13, "name": "total_downloads", "comment": null}, "impressions": {"type": "bigint", "index": 14, "name": "impressions", "comment": null}, "spend": {"type": "double precision", "index": 15, "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.apple_search_ads.apple_search_ads__campaign_report"}, "model.apple_search_ads.apple_search_ads__keyword_report": {"metadata": {"type": "BASE TABLE", "schema": "apple_search_ads_integration_tests_apple_search_ads", "name": "apple_search_ads__keyword_report", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"date_day": {"type": "date", "index": 1, "name": "date_day", "comment": null}, "organization_id": {"type": "integer", "index": 2, "name": "organization_id", "comment": null}, "organization_name": {"type": "text", "index": 3, "name": "organization_name", "comment": null}, "campaign_id": {"type": "integer", "index": 4, "name": "campaign_id", "comment": null}, "campaign_name": {"type": "text", "index": 5, "name": "campaign_name", "comment": null}, "ad_group_id": {"type": "integer", "index": 6, "name": "ad_group_id", "comment": null}, "ad_group_name": {"type": "text", "index": 7, "name": "ad_group_name", "comment": null}, "keyword_id": {"type": "integer", "index": 8, "name": "keyword_id", "comment": null}, "keyword_text": {"type": "text", "index": 9, "name": "keyword_text", "comment": null}, "match_type": {"type": "text", "index": 10, "name": "match_type", "comment": null}, "currency": {"type": "text", "index": 11, "name": "currency", "comment": null}, "keyword_status": {"type": "text", "index": 12, "name": "keyword_status", "comment": null}, "taps": {"type": "bigint", "index": 13, "name": "taps", "comment": null}, "new_downloads": {"type": "bigint", "index": 14, "name": "new_downloads", "comment": null}, "redownloads": {"type": "bigint", "index": 15, "name": "redownloads", "comment": null}, "total_downloads": {"type": "bigint", "index": 16, "name": "total_downloads", "comment": null}, "impressions": {"type": "bigint", "index": 17, "name": "impressions", "comment": null}, "spend": {"type": "double precision", "index": 18, "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.apple_search_ads.apple_search_ads__keyword_report"}, "model.apple_search_ads.apple_search_ads__organization_report": {"metadata": {"type": "BASE TABLE", "schema": "apple_search_ads_integration_tests_apple_search_ads", "name": "apple_search_ads__organization_report", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"date_day": {"type": "date", "index": 1, "name": "date_day", "comment": null}, "organization_id": {"type": "integer", "index": 2, "name": "organization_id", "comment": null}, "organization_name": {"type": "text", "index": 3, "name": "organization_name", "comment": null}, "currency": {"type": "text", "index": 4, "name": "currency", "comment": null}, "taps": {"type": "bigint", "index": 5, "name": "taps", "comment": null}, "new_downloads": {"type": "bigint", "index": 6, "name": "new_downloads", "comment": null}, "redownloads": {"type": "bigint", "index": 7, "name": "redownloads", "comment": null}, "total_downloads": {"type": "bigint", "index": 8, "name": "total_downloads", "comment": null}, "impressions": {"type": "bigint", "index": 9, "name": "impressions", "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.apple_search_ads.apple_search_ads__organization_report"}, "model.apple_search_ads.apple_search_ads__search_term_report": {"metadata": {"type": "BASE TABLE", "schema": "apple_search_ads_integration_tests_apple_search_ads", "name": "apple_search_ads__search_term_report", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"date_day": {"type": "date", "index": 1, "name": "date_day", "comment": null}, "organization_id": {"type": "integer", "index": 2, "name": "organization_id", "comment": null}, "organization_name": {"type": "text", "index": 3, "name": "organization_name", "comment": null}, "campaign_id": {"type": "integer", "index": 4, "name": "campaign_id", "comment": null}, "campaign_name": {"type": "text", "index": 5, "name": "campaign_name", "comment": null}, "ad_group_id": {"type": "integer", "index": 6, "name": "ad_group_id", "comment": null}, "ad_group_name": {"type": "text", "index": 7, "name": "ad_group_name", "comment": null}, "keyword_id": {"type": "integer", "index": 8, "name": "keyword_id", "comment": null}, "keyword_text": {"type": "text", "index": 9, "name": "keyword_text", "comment": null}, "search_term_text": {"type": "text", "index": 10, "name": "search_term_text", "comment": null}, "match_type": {"type": "text", "index": 11, "name": "match_type", "comment": null}, "currency": {"type": "text", "index": 12, "name": "currency", "comment": null}, "taps": {"type": "bigint", "index": 13, "name": "taps", "comment": null}, "new_downloads": {"type": "bigint", "index": 14, "name": "new_downloads", "comment": null}, "redownloads": {"type": "bigint", "index": 15, "name": "redownloads", "comment": null}, "total_downloads": {"type": "bigint", "index": 16, "name": "total_downloads", "comment": null}, "impressions": {"type": "bigint", "index": 17, "name": "impressions", "comment": null}, "spend": {"type": "double precision", "index": 18, "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.apple_search_ads.apple_search_ads__search_term_report"}, "model.apple_search_ads_source.stg_apple_search_ads__ad_group_history": {"metadata": {"type": "BASE TABLE", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "name": "stg_apple_search_ads__ad_group_history", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"modified_at": {"type": "timestamp without time zone", "index": 1, "name": "modified_at", "comment": null}, "organization_id": {"type": "integer", "index": 2, "name": "organization_id", "comment": null}, "campaign_id": {"type": "integer", "index": 3, "name": "campaign_id", "comment": null}, "ad_group_name": {"type": "text", "index": 4, "name": "ad_group_name", "comment": null}, "ad_group_id": {"type": "integer", "index": 5, "name": "ad_group_id", "comment": null}, "ad_group_status": {"type": "text", "index": 6, "name": "ad_group_status", "comment": null}, "start_at": {"type": "timestamp without time zone", "index": 7, "name": "start_at", "comment": null}, "end_at": {"type": "timestamp without time zone", "index": 8, "name": "end_at", "comment": null}, "is_most_recent_record": {"type": "boolean", "index": 9, "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_source.stg_apple_search_ads__ad_group_history"}, "model.apple_search_ads_source.stg_apple_search_ads__ad_group_history_tmp": {"metadata": {"type": "VIEW", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "name": "stg_apple_search_ads__ad_group_history_tmp", "database": "postgres", "comment": null, "owner": "pguser"}, "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_source.stg_apple_search_ads__ad_group_history_tmp"}, "model.apple_search_ads_source.stg_apple_search_ads__ad_group_report": {"metadata": {"type": "BASE TABLE", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "name": "stg_apple_search_ads__ad_group_report", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"date_day": {"type": "date", "index": 1, "name": "date_day", "comment": null}, "ad_group_id": {"type": "integer", "index": 2, "name": "ad_group_id", "comment": null}, "impressions": {"type": "integer", "index": 3, "name": "impressions", "comment": null}, "spend": {"type": "double precision", "index": 4, "name": "spend", "comment": null}, "currency": {"type": "text", "index": 5, "name": "currency", "comment": null}, "new_downloads": {"type": "integer", "index": 6, "name": "new_downloads", "comment": null}, "redownloads": {"type": "integer", "index": 7, "name": "redownloads", "comment": null}, "taps": {"type": "integer", "index": 8, "name": "taps", "comment": null}}, "stats": {"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_source.stg_apple_search_ads__ad_group_report"}, "model.apple_search_ads_source.stg_apple_search_ads__ad_group_report_tmp": {"metadata": {"type": "VIEW", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "name": "stg_apple_search_ads__ad_group_report_tmp", "database": "postgres", "comment": null, "owner": "pguser"}, "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}}, "stats": {"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_source.stg_apple_search_ads__ad_group_report_tmp"}, "model.apple_search_ads_source.stg_apple_search_ads__ad_history": {"metadata": {"type": "BASE TABLE", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "name": "stg_apple_search_ads__ad_history", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"created_at": {"type": "timestamp without time zone", "index": 1, "name": "created_at", "comment": null}, "modified_at": {"type": "timestamp without time zone", "index": 2, "name": "modified_at", "comment": null}, "organization_id": {"type": "integer", "index": 3, "name": "organization_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}, "ad_name": {"type": "text", "index": 6, "name": "ad_name", "comment": null}, "ad_id": {"type": "integer", "index": 7, "name": "ad_id", "comment": null}, "ad_status": {"type": "text", "index": 8, "name": "ad_status", "comment": null}, "is_most_recent_record": {"type": "boolean", "index": 9, "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_source.stg_apple_search_ads__ad_history"}, "model.apple_search_ads_source.stg_apple_search_ads__ad_history_tmp": {"metadata": {"type": "VIEW", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "name": "stg_apple_search_ads__ad_history_tmp", "database": "postgres", "comment": null, "owner": "pguser"}, "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_source.stg_apple_search_ads__ad_history_tmp"}, "model.apple_search_ads_source.stg_apple_search_ads__ad_report": {"metadata": {"type": "BASE TABLE", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "name": "stg_apple_search_ads__ad_report", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"date_day": {"type": "date", "index": 1, "name": "date_day", "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}, "spend": {"type": "double precision", "index": 6, "name": "spend", "comment": null}, "currency": {"type": "text", "index": 7, "name": "currency", "comment": null}, "new_downloads": {"type": "integer", "index": 8, "name": "new_downloads", "comment": null}, "redownloads": {"type": "integer", "index": 9, "name": "redownloads", "comment": null}, "taps": {"type": "integer", "index": 10, "name": "taps", "comment": null}}, "stats": {"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_source.stg_apple_search_ads__ad_report"}, "model.apple_search_ads_source.stg_apple_search_ads__ad_report_tmp": {"metadata": {"type": "VIEW", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "name": "stg_apple_search_ads__ad_report_tmp", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"date": {"type": "date", "index": 1, "name": "date", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "campaign_id": {"type": "integer", "index": 3, "name": "campaign_id", "comment": null}, "ad_group_id": {"type": "integer", "index": 4, "name": "ad_group_id", "comment": null}, "ad_id": {"type": "integer", "index": 5, "name": "ad_id", "comment": null}, "impressions": {"type": "integer", "index": 6, "name": "impressions", "comment": null}, "local_spend_amount": {"type": "double precision", "index": 7, "name": "local_spend_amount", "comment": null}, "local_spend_currency": {"type": "text", "index": 8, "name": "local_spend_currency", "comment": null}, "new_downloads": {"type": "integer", "index": 9, "name": "new_downloads", "comment": null}, "redownloads": {"type": "integer", "index": 10, "name": "redownloads", "comment": null}, "taps": {"type": "integer", "index": 11, "name": "taps", "comment": null}}, "stats": {"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_source.stg_apple_search_ads__ad_report_tmp"}, "model.apple_search_ads_source.stg_apple_search_ads__campaign_history": {"metadata": {"type": "BASE TABLE", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "name": "stg_apple_search_ads__campaign_history", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"modified_at": {"type": "timestamp without time zone", "index": 1, "name": "modified_at", "comment": null}, "organization_id": {"type": "integer", "index": 2, "name": "organization_id", "comment": null}, "campaign_name": {"type": "text", "index": 3, "name": "campaign_name", "comment": null}, "campaign_id": {"type": "integer", "index": 4, "name": "campaign_id", "comment": null}, "campaign_status": {"type": "text", "index": 5, "name": "campaign_status", "comment": null}, "start_at": {"type": "timestamp without time zone", "index": 6, "name": "start_at", "comment": null}, "end_at": {"type": "timestamp without time zone", "index": 7, "name": "end_at", "comment": null}, "is_most_recent_record": {"type": "boolean", "index": 8, "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_source.stg_apple_search_ads__campaign_history"}, "model.apple_search_ads_source.stg_apple_search_ads__campaign_history_tmp": {"metadata": {"type": "VIEW", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "name": "stg_apple_search_ads__campaign_history_tmp", "database": "postgres", "comment": null, "owner": "pguser"}, "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_source.stg_apple_search_ads__campaign_history_tmp"}, "model.apple_search_ads_source.stg_apple_search_ads__campaign_report": {"metadata": {"type": "BASE TABLE", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "name": "stg_apple_search_ads__campaign_report", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"date_day": {"type": "date", "index": 1, "name": "date_day", "comment": null}, "campaign_id": {"type": "integer", "index": 2, "name": "campaign_id", "comment": null}, "impressions": {"type": "integer", "index": 3, "name": "impressions", "comment": null}, "spend": {"type": "double precision", "index": 4, "name": "spend", "comment": null}, "currency": {"type": "text", "index": 5, "name": "currency", "comment": null}, "new_downloads": {"type": "integer", "index": 6, "name": "new_downloads", "comment": null}, "redownloads": {"type": "integer", "index": 7, "name": "redownloads", "comment": null}, "taps": {"type": "integer", "index": 8, "name": "taps", "comment": null}}, "stats": {"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_source.stg_apple_search_ads__campaign_report"}, "model.apple_search_ads_source.stg_apple_search_ads__campaign_report_tmp": {"metadata": {"type": "VIEW", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "name": "stg_apple_search_ads__campaign_report_tmp", "database": "postgres", "comment": null, "owner": "pguser"}, "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}}, "stats": {"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_source.stg_apple_search_ads__campaign_report_tmp"}, "model.apple_search_ads_source.stg_apple_search_ads__keyword_history": {"metadata": {"type": "BASE TABLE", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "name": "stg_apple_search_ads__keyword_history", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"modified_at": {"type": "timestamp without time zone", "index": 1, "name": "modified_at", "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}, "keyword_id": {"type": "integer", "index": 4, "name": "keyword_id", "comment": null}, "bid_amount": {"type": "double precision", "index": 5, "name": "bid_amount", "comment": null}, "bid_currency": {"type": "text", "index": 6, "name": "bid_currency", "comment": null}, "match_type": {"type": "text", "index": 7, "name": "match_type", "comment": null}, "keyword_status": {"type": "text", "index": 8, "name": "keyword_status", "comment": null}, "keyword_text": {"type": "text", "index": 9, "name": "keyword_text", "comment": null}, "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_source.stg_apple_search_ads__keyword_history"}, "model.apple_search_ads_source.stg_apple_search_ads__keyword_history_tmp": {"metadata": {"type": "VIEW", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "name": "stg_apple_search_ads__keyword_history_tmp", "database": "postgres", "comment": null, "owner": "pguser"}, "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_source.stg_apple_search_ads__keyword_history_tmp"}, "model.apple_search_ads_source.stg_apple_search_ads__keyword_report": {"metadata": {"type": "BASE TABLE", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "name": "stg_apple_search_ads__keyword_report", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"date_day": {"type": "date", "index": 1, "name": "date_day", "comment": null}, "keyword_id": {"type": "integer", "index": 2, "name": "keyword_id", "comment": null}, "impressions": {"type": "integer", "index": 3, "name": "impressions", "comment": null}, "spend": {"type": "double precision", "index": 4, "name": "spend", "comment": null}, "currency": {"type": "text", "index": 5, "name": "currency", "comment": null}, "new_downloads": {"type": "integer", "index": 6, "name": "new_downloads", "comment": null}, "redownloads": {"type": "integer", "index": 7, "name": "redownloads", "comment": null}, "taps": {"type": "integer", "index": 8, "name": "taps", "comment": null}}, "stats": {"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_source.stg_apple_search_ads__keyword_report"}, "model.apple_search_ads_source.stg_apple_search_ads__keyword_report_tmp": {"metadata": {"type": "VIEW", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "name": "stg_apple_search_ads__keyword_report_tmp", "database": "postgres", "comment": null, "owner": "pguser"}, "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}}, "stats": {"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_source.stg_apple_search_ads__keyword_report_tmp"}, "model.apple_search_ads_source.stg_apple_search_ads__organization": {"metadata": {"type": "BASE TABLE", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "name": "stg_apple_search_ads__organization", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"organization_id": {"type": "integer", "index": 1, "name": "organization_id", "comment": null}, "currency": {"type": "text", "index": 2, "name": "currency", "comment": null}, "payment_model": {"type": "text", "index": 3, "name": "payment_model", "comment": null}, "organization_name": {"type": "text", "index": 4, "name": "organization_name", "comment": null}, "time_zone": {"type": "text", "index": 5, "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_source.stg_apple_search_ads__organization"}, "model.apple_search_ads_source.stg_apple_search_ads__organization_tmp": {"metadata": {"type": "VIEW", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "name": "stg_apple_search_ads__organization_tmp", "database": "postgres", "comment": null, "owner": "pguser"}, "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_source.stg_apple_search_ads__organization_tmp"}, "model.apple_search_ads_source.stg_apple_search_ads__search_term_report": {"metadata": {"type": "BASE TABLE", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "name": "stg_apple_search_ads__search_term_report", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"date_day": {"type": "date", "index": 1, "name": "date_day", "comment": null}, "_fivetran_id": {"type": "text", "index": 2, "name": "_fivetran_id", "comment": null}, "campaign_id": {"type": "integer", "index": 3, "name": "campaign_id", "comment": null}, "ad_group_id": {"type": "integer", "index": 4, "name": "ad_group_id", "comment": null}, "ad_group_name": {"type": "text", "index": 5, "name": "ad_group_name", "comment": null}, "bid_amount": {"type": "double precision", "index": 6, "name": "bid_amount", "comment": null}, "bid_currency": {"type": "text", "index": 7, "name": "bid_currency", "comment": null}, "keyword_text": {"type": "text", "index": 8, "name": "keyword_text", "comment": null}, "keyword_display_status": {"type": "text", "index": 9, "name": "keyword_display_status", "comment": null}, "keyword_id": {"type": "integer", "index": 10, "name": "keyword_id", "comment": null}, "spend": {"type": "double precision", "index": 11, "name": "spend", "comment": null}, "currency": {"type": "text", "index": 12, "name": "currency", "comment": null}, "match_type": {"type": "text", "index": 13, "name": "match_type", "comment": null}, "search_term_source": {"type": "text", "index": 14, "name": "search_term_source", "comment": null}, "search_term_text": {"type": "text", "index": 15, "name": "search_term_text", "comment": null}, "impressions": {"type": "integer", "index": 16, "name": "impressions", "comment": null}, "taps": {"type": "integer", "index": 17, "name": "taps", "comment": null}, "new_downloads": {"type": "integer", "index": 18, "name": "new_downloads", "comment": null}, "redownloads": {"type": "integer", "index": 19, "name": "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_source.stg_apple_search_ads__search_term_report"}, "model.apple_search_ads_source.stg_apple_search_ads__search_term_report_tmp": {"metadata": {"type": "VIEW", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "name": "stg_apple_search_ads__search_term_report_tmp", "database": "postgres", "comment": null, "owner": "pguser"}, "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}}, "stats": {"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_source.stg_apple_search_ads__search_term_report_tmp"}}, "sources": {"source.apple_search_ads_source.apple_search_ads.ad_group_history": {"metadata": {"type": "BASE TABLE", "schema": "apple_search_ads_integration_tests", "name": "ad_group_history_data", "database": "postgres", "comment": null, "owner": "pguser"}, "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_source.apple_search_ads.ad_group_history"}, "source.apple_search_ads_source.apple_search_ads.ad_group_report": {"metadata": {"type": "BASE TABLE", "schema": "apple_search_ads_integration_tests", "name": "ad_group_report_data", "database": "postgres", "comment": null, "owner": "pguser"}, "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}}, "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_source.apple_search_ads.ad_group_report"}, "source.apple_search_ads_source.apple_search_ads.ad_history": {"metadata": {"type": "BASE TABLE", "schema": "apple_search_ads_integration_tests", "name": "ad_history_data", "database": "postgres", "comment": null, "owner": "pguser"}, "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_source.apple_search_ads.ad_history"}, "source.apple_search_ads_source.apple_search_ads.ad_level_report": {"metadata": {"type": "BASE TABLE", "schema": "apple_search_ads_integration_tests", "name": "ad_report_data", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"date": {"type": "date", "index": 1, "name": "date", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "campaign_id": {"type": "integer", "index": 3, "name": "campaign_id", "comment": null}, "ad_group_id": {"type": "integer", "index": 4, "name": "ad_group_id", "comment": null}, "ad_id": {"type": "integer", "index": 5, "name": "ad_id", "comment": null}, "impressions": {"type": "integer", "index": 6, "name": "impressions", "comment": null}, "local_spend_amount": {"type": "double precision", "index": 7, "name": "local_spend_amount", "comment": null}, "local_spend_currency": {"type": "text", "index": 8, "name": "local_spend_currency", "comment": null}, "new_downloads": {"type": "integer", "index": 9, "name": "new_downloads", "comment": null}, "redownloads": {"type": "integer", "index": 10, "name": "redownloads", "comment": null}, "taps": {"type": "integer", "index": 11, "name": "taps", "comment": null}}, "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_source.apple_search_ads.ad_level_report"}, "source.apple_search_ads_source.apple_search_ads.campaign_history": {"metadata": {"type": "BASE TABLE", "schema": "apple_search_ads_integration_tests", "name": "campaign_history_data", "database": "postgres", "comment": null, "owner": "pguser"}, "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_source.apple_search_ads.campaign_history"}, "source.apple_search_ads_source.apple_search_ads.campaign_report": {"metadata": {"type": "BASE TABLE", "schema": "apple_search_ads_integration_tests", "name": "campaign_report_data", "database": "postgres", "comment": null, "owner": "pguser"}, "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}}, "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_source.apple_search_ads.campaign_report"}, "source.apple_search_ads_source.apple_search_ads.keyword_history": {"metadata": {"type": "BASE TABLE", "schema": "apple_search_ads_integration_tests", "name": "keyword_history_data", "database": "postgres", "comment": null, "owner": "pguser"}, "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_source.apple_search_ads.keyword_history"}, "source.apple_search_ads_source.apple_search_ads.keyword_report": {"metadata": {"type": "BASE TABLE", "schema": "apple_search_ads_integration_tests", "name": "keyword_report_data", "database": "postgres", "comment": null, "owner": "pguser"}, "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}}, "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_source.apple_search_ads.keyword_report"}, "source.apple_search_ads_source.apple_search_ads.organization": {"metadata": {"type": "BASE TABLE", "schema": "apple_search_ads_integration_tests", "name": "organization_data", "database": "postgres", "comment": null, "owner": "pguser"}, "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_source.apple_search_ads.organization"}, "source.apple_search_ads_source.apple_search_ads.search_term_report": {"metadata": {"type": "BASE TABLE", "schema": "apple_search_ads_integration_tests", "name": "search_term_report_data", "database": "postgres", "comment": null, "owner": "pguser"}, "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}}, "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_source.apple_search_ads.search_term_report"}}, "errors": null} \ No newline at end of file diff --git a/docs/manifest.json b/docs/manifest.json index 2660675..c170296 100644 --- a/docs/manifest.json +++ b/docs/manifest.json @@ -1 +1 @@ -{"metadata": {"dbt_schema_version": "https://schemas.getdbt.com/dbt/manifest/v7.json", "dbt_version": "1.3.0", "generated_at": "2022-10-25T20:13:51.046075Z", "invocation_id": "2191920f-7f18-410e-bf49-1ac3da176caa", "env": {}, "project_id": "b8a2464c562afb40124f0d47d8c7adc5", "user_id": "2bfa9082-ea6e-467b-abdc-d0514ab111d9", "send_anonymous_usage_stats": true, "adapter_type": "bigquery"}, "nodes": {"seed.apple_search_ads_integration_tests.ad_group_report_data": {"compiled": true, "resource_type": "seed", "depends_on": {"macros": [], "nodes": []}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "materialized": "seed", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {"modification_time": "timestamp", "start_time": "timestamp", "end_time": "timestamp", "creation_time": "timestamp", "_fivetran_synced": "timestamp"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "quote_columns": false, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests", "fqn": ["apple_search_ads_integration_tests", "ad_group_report_data"], "unique_id": "seed.apple_search_ads_integration_tests.ad_group_report_data", "raw_code": "", "language": "sql", "package_name": "apple_search_ads_integration_tests", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests", "path": "ad_group_report_data.csv", "original_file_path": "seeds/ad_group_report_data.csv", "name": "ad_group_report_data", "alias": "ad_group_report_data", "checksum": {"name": "sha256", "checksum": "135ee77ac9c3aa146d4f0281b04312c1034c271276f215b27145bb99f83534f5"}, "tags": [], "refs": [], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": null, "build_path": null, "deferred": false, "unrendered_config": {"quote_columns": "{{ true if target.type == 'redshift' else false }}", "column_types": {"modification_time": "timestamp", "start_time": "timestamp", "end_time": "timestamp", "creation_time": "timestamp", "_fivetran_synced": "timestamp"}}, "created_at": 1666728757.761806, "compiled_code": "", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`apple_search_ads_integration_tests`.`ad_group_report_data`"}, "seed.apple_search_ads_integration_tests.ad_report_data": {"compiled": true, "resource_type": "seed", "depends_on": {"macros": [], "nodes": []}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "materialized": "seed", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {"modification_time": "timestamp", "start_time": "timestamp", "end_time": "timestamp", "creation_time": "timestamp", "_fivetran_synced": "timestamp"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "quote_columns": false, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests", "fqn": ["apple_search_ads_integration_tests", "ad_report_data"], "unique_id": "seed.apple_search_ads_integration_tests.ad_report_data", "raw_code": "", "language": "sql", "package_name": "apple_search_ads_integration_tests", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests", "path": "ad_report_data.csv", "original_file_path": "seeds/ad_report_data.csv", "name": "ad_report_data", "alias": "ad_report_data", "checksum": {"name": "sha256", "checksum": "beef859bd11dd339082a3e8d23414c5da7e30ae75ade28736a3dbdf292627708"}, "tags": [], "refs": [], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": null, "build_path": null, "deferred": false, "unrendered_config": {"quote_columns": "{{ true if target.type == 'redshift' else false }}", "column_types": {"modification_time": "timestamp", "start_time": "timestamp", "end_time": "timestamp", "creation_time": "timestamp", "_fivetran_synced": "timestamp"}}, "created_at": 1666728757.7670012, "compiled_code": "", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`apple_search_ads_integration_tests`.`ad_report_data`"}, "seed.apple_search_ads_integration_tests.keyword_report_data": {"compiled": true, "resource_type": "seed", "depends_on": {"macros": [], "nodes": []}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "materialized": "seed", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {"modification_time": "timestamp", "start_time": "timestamp", "end_time": "timestamp", "creation_time": "timestamp", "_fivetran_synced": "timestamp"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "quote_columns": false, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests", "fqn": ["apple_search_ads_integration_tests", "keyword_report_data"], "unique_id": "seed.apple_search_ads_integration_tests.keyword_report_data", "raw_code": "", "language": "sql", "package_name": "apple_search_ads_integration_tests", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests", "path": "keyword_report_data.csv", "original_file_path": "seeds/keyword_report_data.csv", "name": "keyword_report_data", "alias": "keyword_report_data", "checksum": {"name": "sha256", "checksum": "6aafe7098ea6f18764856a6631b190de106462f83f8bb1d3c8fb91e2d3cfffee"}, "tags": [], "refs": [], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": null, "build_path": null, "deferred": false, "unrendered_config": {"quote_columns": "{{ true if target.type == 'redshift' else false }}", "column_types": {"modification_time": "timestamp", "start_time": "timestamp", "end_time": "timestamp", "creation_time": "timestamp", "_fivetran_synced": "timestamp"}}, "created_at": 1666728757.7681339, "compiled_code": "", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`apple_search_ads_integration_tests`.`keyword_report_data`"}, "seed.apple_search_ads_integration_tests.ad_history_data": {"compiled": true, "resource_type": "seed", "depends_on": {"macros": [], "nodes": []}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "materialized": "seed", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {"modification_time": "timestamp", "start_time": "timestamp", "end_time": "timestamp", "creation_time": "timestamp", "_fivetran_synced": "timestamp"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "quote_columns": false, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests", "fqn": ["apple_search_ads_integration_tests", "ad_history_data"], "unique_id": "seed.apple_search_ads_integration_tests.ad_history_data", "raw_code": "", "language": "sql", "package_name": "apple_search_ads_integration_tests", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests", "path": "ad_history_data.csv", "original_file_path": "seeds/ad_history_data.csv", "name": "ad_history_data", "alias": "ad_history_data", "checksum": {"name": "sha256", "checksum": "6b7e388b2b1ac23dd3f2e0cc1a781099a525e921a36da2fe83f52bd207066ea8"}, "tags": [], "refs": [], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": null, "build_path": null, "deferred": false, "unrendered_config": {"quote_columns": "{{ true if target.type == 'redshift' else false }}", "column_types": {"modification_time": "timestamp", "start_time": "timestamp", "end_time": "timestamp", "creation_time": "timestamp", "_fivetran_synced": "timestamp"}}, "created_at": 1666728757.769118, "compiled_code": "", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`apple_search_ads_integration_tests`.`ad_history_data`"}, "seed.apple_search_ads_integration_tests.ad_group_history_data": {"compiled": true, "resource_type": "seed", "depends_on": {"macros": [], "nodes": []}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "materialized": "seed", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {"modification_time": "timestamp", "start_time": "timestamp", "end_time": "timestamp", "creation_time": "timestamp", "_fivetran_synced": "timestamp"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "quote_columns": false, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests", "fqn": ["apple_search_ads_integration_tests", "ad_group_history_data"], "unique_id": "seed.apple_search_ads_integration_tests.ad_group_history_data", "raw_code": "", "language": "sql", "package_name": "apple_search_ads_integration_tests", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests", "path": "ad_group_history_data.csv", "original_file_path": "seeds/ad_group_history_data.csv", "name": "ad_group_history_data", "alias": "ad_group_history_data", "checksum": {"name": "sha256", "checksum": "a9cfeb9cc85210420753798963e582f647bc3fe966ef725b7d3cd061f65325c4"}, "tags": [], "refs": [], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": null, "build_path": null, "deferred": false, "unrendered_config": {"quote_columns": "{{ true if target.type == 'redshift' else false }}", "column_types": {"modification_time": "timestamp", "start_time": "timestamp", "end_time": "timestamp", "creation_time": "timestamp", "_fivetran_synced": "timestamp"}}, "created_at": 1666728757.770088, "compiled_code": "", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`apple_search_ads_integration_tests`.`ad_group_history_data`"}, "seed.apple_search_ads_integration_tests.campaign_history_data": {"compiled": true, "resource_type": "seed", "depends_on": {"macros": [], "nodes": []}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "materialized": "seed", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {"modification_time": "timestamp", "start_time": "timestamp", "end_time": "timestamp", "creation_time": "timestamp", "_fivetran_synced": "timestamp"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "quote_columns": false, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests", "fqn": ["apple_search_ads_integration_tests", "campaign_history_data"], "unique_id": "seed.apple_search_ads_integration_tests.campaign_history_data", "raw_code": "", "language": "sql", "package_name": "apple_search_ads_integration_tests", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests", "path": "campaign_history_data.csv", "original_file_path": "seeds/campaign_history_data.csv", "name": "campaign_history_data", "alias": "campaign_history_data", "checksum": {"name": "sha256", "checksum": "56fa1720930e88d590eb11b16d93d5c7e28e5f9bec57866047040a1a183ad3f3"}, "tags": [], "refs": [], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": null, "build_path": null, "deferred": false, "unrendered_config": {"quote_columns": "{{ true if target.type == 'redshift' else false }}", "column_types": {"modification_time": "timestamp", "start_time": "timestamp", "end_time": "timestamp", "creation_time": "timestamp", "_fivetran_synced": "timestamp"}}, "created_at": 1666728757.771062, "compiled_code": "", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`apple_search_ads_integration_tests`.`campaign_history_data`"}, "seed.apple_search_ads_integration_tests.campaign_report_data": {"compiled": true, "resource_type": "seed", "depends_on": {"macros": [], "nodes": []}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "materialized": "seed", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {"modification_time": "timestamp", "start_time": "timestamp", "end_time": "timestamp", "creation_time": "timestamp", "_fivetran_synced": "timestamp"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "quote_columns": false, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests", "fqn": ["apple_search_ads_integration_tests", "campaign_report_data"], "unique_id": "seed.apple_search_ads_integration_tests.campaign_report_data", "raw_code": "", "language": "sql", "package_name": "apple_search_ads_integration_tests", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests", "path": "campaign_report_data.csv", "original_file_path": "seeds/campaign_report_data.csv", "name": "campaign_report_data", "alias": "campaign_report_data", "checksum": {"name": "sha256", "checksum": "a4a374475156eb8d9ddc40c43cadbcc843efcf7a55180346d2d4b875c2791ab1"}, "tags": [], "refs": [], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": null, "build_path": null, "deferred": false, "unrendered_config": {"quote_columns": "{{ true if target.type == 'redshift' else false }}", "column_types": {"modification_time": "timestamp", "start_time": "timestamp", "end_time": "timestamp", "creation_time": "timestamp", "_fivetran_synced": "timestamp"}}, "created_at": 1666728757.7721548, "compiled_code": "", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`apple_search_ads_integration_tests`.`campaign_report_data`"}, "seed.apple_search_ads_integration_tests.keyword_history_data": {"compiled": true, "resource_type": "seed", "depends_on": {"macros": [], "nodes": []}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "materialized": "seed", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {"modification_time": "timestamp", "start_time": "timestamp", "end_time": "timestamp", "creation_time": "timestamp", "_fivetran_synced": "timestamp"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "quote_columns": false, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests", "fqn": ["apple_search_ads_integration_tests", "keyword_history_data"], "unique_id": "seed.apple_search_ads_integration_tests.keyword_history_data", "raw_code": "", "language": "sql", "package_name": "apple_search_ads_integration_tests", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests", "path": "keyword_history_data.csv", "original_file_path": "seeds/keyword_history_data.csv", "name": "keyword_history_data", "alias": "keyword_history_data", "checksum": {"name": "sha256", "checksum": "9ad23801ae95fc44211fac6c893f67825e34df0e6ba4e967eeb4fe5c3391b86b"}, "tags": [], "refs": [], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": null, "build_path": null, "deferred": false, "unrendered_config": {"quote_columns": "{{ true if target.type == 'redshift' else false }}", "column_types": {"modification_time": "timestamp", "start_time": "timestamp", "end_time": "timestamp", "creation_time": "timestamp", "_fivetran_synced": "timestamp"}}, "created_at": 1666728757.7731142, "compiled_code": "", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`apple_search_ads_integration_tests`.`keyword_history_data`"}, "seed.apple_search_ads_integration_tests.search_term_report_data": {"compiled": true, "resource_type": "seed", "depends_on": {"macros": [], "nodes": []}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "materialized": "seed", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {"modification_time": "timestamp", "start_time": "timestamp", "end_time": "timestamp", "creation_time": "timestamp", "_fivetran_synced": "timestamp"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "quote_columns": false, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests", "fqn": ["apple_search_ads_integration_tests", "search_term_report_data"], "unique_id": "seed.apple_search_ads_integration_tests.search_term_report_data", "raw_code": "", "language": "sql", "package_name": "apple_search_ads_integration_tests", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests", "path": "search_term_report_data.csv", "original_file_path": "seeds/search_term_report_data.csv", "name": "search_term_report_data", "alias": "search_term_report_data", "checksum": {"name": "sha256", "checksum": "6add75b68a0f9a6f153a9fb83a682387a76a5b89d6dcd14fdbbcb5b418bb3b5a"}, "tags": [], "refs": [], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": null, "build_path": null, "deferred": false, "unrendered_config": {"quote_columns": "{{ true if target.type == 'redshift' else false }}", "column_types": {"modification_time": "timestamp", "start_time": "timestamp", "end_time": "timestamp", "creation_time": "timestamp", "_fivetran_synced": "timestamp"}}, "created_at": 1666728757.7740648, "compiled_code": "", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`apple_search_ads_integration_tests`.`search_term_report_data`"}, "seed.apple_search_ads_integration_tests.organization_data": {"compiled": true, "resource_type": "seed", "depends_on": {"macros": [], "nodes": []}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "materialized": "seed", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {"modification_time": "timestamp", "start_time": "timestamp", "end_time": "timestamp", "creation_time": "timestamp", "_fivetran_synced": "timestamp"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "quote_columns": false, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests", "fqn": ["apple_search_ads_integration_tests", "organization_data"], "unique_id": "seed.apple_search_ads_integration_tests.organization_data", "raw_code": "", "language": "sql", "package_name": "apple_search_ads_integration_tests", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests", "path": "organization_data.csv", "original_file_path": "seeds/organization_data.csv", "name": "organization_data", "alias": "organization_data", "checksum": {"name": "sha256", "checksum": "bbb5878ab9c07bd1f391181a8321ea50476f37d25f36fd1d66e58d513336699c"}, "tags": [], "refs": [], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": null, "build_path": null, "deferred": false, "unrendered_config": {"quote_columns": "{{ true if target.type == 'redshift' else false }}", "column_types": {"modification_time": "timestamp", "start_time": "timestamp", "end_time": "timestamp", "creation_time": "timestamp", "_fivetran_synced": "timestamp"}}, "created_at": 1666728757.7750359, "compiled_code": "", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`apple_search_ads_integration_tests`.`organization_data`"}, "model.apple_search_ads.apple_search_ads__ad_report": {"compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.fivetran_utils.persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__ad_report", "model.apple_search_ads_source.stg_apple_search_ads__ad_history", "model.apple_search_ads_source.stg_apple_search_ads__ad_group_history", "model.apple_search_ads_source.stg_apple_search_ads__campaign_history", "model.apple_search_ads_source.stg_apple_search_ads__organization"]}, "config": {"enabled": true, "alias": null, "schema": "apple_search_ads", "database": null, "tags": [], "meta": {}, "materialized": "table", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests_apple_search_ads", "fqn": ["apple_search_ads", "apple_search_ads__ad_report"], "unique_id": "model.apple_search_ads.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 {{ var('ad_report') }}\n), \n\nad as (\n\n select * \n from {{ var('ad_history') }}\n where is_most_recent_record = True\n), \n\nad_group as (\n\n select * \n from {{ var('ad_group_history') }}\n where is_most_recent_record = True\n), \n\ncampaign as (\n\n select *\n from {{ var('campaign_history') }}\n where is_most_recent_record = True\n), \n\norganization as (\n\n select * \n from {{ var('organization') }}\n), \n\njoined as (\n\n select \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 ad.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,\n sum(report.redownloads) as redownloads,\n sum(report.new_downloads + report.redownloads) as total_downloads,\n sum(report.impressions) as impressions,\n sum(report.spend) as spend\n\n {{ fivetran_utils.persist_pass_through_columns(pass_through_variable='apple_search_ads__ad_passthrough_metrics', transform = 'sum') }}\n from report\n join ad \n on report.ad_id = ad.ad_id\n join ad_group \n on report.ad_group_id = ad_group.ad_group_id\n join campaign \n on report.campaign_id = campaign.campaign_id\n join organization \n on ad.organization_id = organization.organization_id\n {{ dbt_utils.group_by(11) }}\n)\n\nselect * \nfrom joined", "language": "sql", "package_name": "apple_search_ads", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads", "path": "apple_search_ads__ad_report.sql", "original_file_path": "models/apple_search_ads__ad_report.sql", "name": "apple_search_ads__ad_report", "alias": "apple_search_ads__ad_report", "checksum": {"name": "sha256", "checksum": "9be99b8581d2c85b4b11327ae3eef34d26121ed866e5762ff7f627b2c24b63a9"}, "tags": [], "refs": [["stg_apple_search_ads__ad_report"], ["stg_apple_search_ads__ad_history"], ["stg_apple_search_ads__ad_group_history"], ["stg_apple_search_ads__campaign_history"], ["stg_apple_search_ads__organization"]], "sources": [], "metrics": [], "description": "Each record represents the daily ad performance of each ad.", "columns": {"organization_id": {"name": "organization_id", "description": "Organization ID associated with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "organization_name": {"name": "organization_name", "description": "Organization name associated with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_id": {"name": "campaign_id", "description": "Campaign ID associated with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_name": {"name": "campaign_name", "description": "Campaign name associated with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "ad_group_id": {"name": "ad_group_id", "description": "Ad group ID associated with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "ad_group_name": {"name": "ad_group_name", "description": "Ad group name associated with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "ad_id": {"name": "ad_id", "description": "Ad ID associated with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "ad_name": {"name": "ad_name", "description": "Ad name associated with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "ad_status": {"name": "ad_status", "description": "The status of the ad associated with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "date_day": {"name": "date_day", "description": "Date of the report.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "currency": {"name": "currency", "description": "This currency value should match the respective organization's currency value.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "taps": {"name": "taps", "description": "Number of taps on ad group on given day.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "new_downloads": {"name": "new_downloads", "description": "App downloads from new users who have never before installed app of ad group in a given day.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "redownloads": {"name": "redownloads", "description": "Number of user downloads where user deletes app 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 of ad group in a given day.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_downloads": {"name": "total_downloads", "description": "The sum of new_downloads and redownloads.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "impressions": {"name": "impressions", "description": "The number of impressions of ad group in a given day.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "spend": {"name": "spend", "description": "The spend on ad group in the given day.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": "apple_search_ads://models/apple_search_ads.yml", "compiled_path": "target/compiled/apple_search_ads/models/apple_search_ads__ad_report.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "apple_search_ads", "materialized": "table", "enabled": true}, "created_at": 1666728757.966059, "compiled_code": "\n\nwith report as (\n\n select *\n from `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__ad_report`\n), \n\nad as (\n\n select * \n from `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__ad_history`\n where is_most_recent_record = True\n), \n\nad_group as (\n\n select * \n from `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__ad_group_history`\n where is_most_recent_record = True\n), \n\ncampaign as (\n\n select *\n from `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__campaign_history`\n where is_most_recent_record = True\n), \n\norganization as (\n\n select * \n from `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__organization`\n), \n\njoined as (\n\n select \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 ad.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,\n sum(report.redownloads) as redownloads,\n sum(report.new_downloads + report.redownloads) as total_downloads,\n sum(report.impressions) as impressions,\n sum(report.spend) as spend\n\n \n\n\n\n\n from report\n join ad \n on report.ad_id = ad.ad_id\n join ad_group \n on report.ad_group_id = ad_group.ad_group_id\n join campaign \n on report.campaign_id = campaign.campaign_id\n join organization \n on ad.organization_id = organization.organization_id\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": [], "relation_name": "`dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads`.`apple_search_ads__ad_report`"}, "model.apple_search_ads.apple_search_ads__ad_group_report": {"compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.fivetran_utils.persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__ad_group_report", "model.apple_search_ads_source.stg_apple_search_ads__ad_group_history", "model.apple_search_ads_source.stg_apple_search_ads__campaign_history", "model.apple_search_ads_source.stg_apple_search_ads__organization"]}, "config": {"enabled": true, "alias": null, "schema": "apple_search_ads", "database": null, "tags": [], "meta": {}, "materialized": "table", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests_apple_search_ads", "fqn": ["apple_search_ads", "apple_search_ads__ad_group_report"], "unique_id": "model.apple_search_ads.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 {{ var('ad_group_report') }}\n), \n\nad_group as (\n\n select * \n from {{ var('ad_group_history') }}\n where is_most_recent_record = True\n), \n\ncampaign as (\n\n select *\n from {{ var('campaign_history') }}\n where is_most_recent_record = True\n), \n\norganization as (\n\n select * \n from {{ var('organization') }}\n), \n\njoined as (\n\n select \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.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,\n sum(report.redownloads) as redownloads,\n sum(report.new_downloads + report.redownloads) as total_downloads,\n sum(report.impressions) as impressions,\n sum(report.spend) as spend\n\n {{ fivetran_utils.persist_pass_through_columns(pass_through_variable='apple_search_ads__ad_group_passthrough_metrics', transform = 'sum') }}\n from report\n join ad_group \n on report.ad_group_id = ad_group.ad_group_id\n join campaign \n on ad_group.campaign_id = campaign.campaign_id\n join organization \n on ad_group.organization_id = organization.organization_id\n {{ dbt_utils.group_by(11) }}\n)\n\nselect * \nfrom joined", "language": "sql", "package_name": "apple_search_ads", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads", "path": "apple_search_ads__ad_group_report.sql", "original_file_path": "models/apple_search_ads__ad_group_report.sql", "name": "apple_search_ads__ad_group_report", "alias": "apple_search_ads__ad_group_report", "checksum": {"name": "sha256", "checksum": "a1edd5d4e81de3dadca268c67fc1bee311cab1edc7efe48a494c7017c7acdc80"}, "tags": [], "refs": [["stg_apple_search_ads__ad_group_report"], ["stg_apple_search_ads__ad_group_history"], ["stg_apple_search_ads__campaign_history"], ["stg_apple_search_ads__organization"]], "sources": [], "metrics": [], "description": "Each record represents the daily ad performance of each ad group.", "columns": {"organization_id": {"name": "organization_id", "description": "Organization ID associated with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "organization_name": {"name": "organization_name", "description": "Organization name associated with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_id": {"name": "campaign_id", "description": "Campaign ID associated with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_name": {"name": "campaign_name", "description": "Campaign name associated with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "ad_group_id": {"name": "ad_group_id", "description": "Ad group ID associated with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "ad_group_name": {"name": "ad_group_name", "description": "Ad group name associated with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "ad_group_status": {"name": "ad_group_status", "description": "The status of the ad group associated with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "start_at": {"name": "start_at", "description": "The start timestamp for this ad group.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "end_at": {"name": "end_at", "description": "The end timestamp for this ad group.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "date_day": {"name": "date_day", "description": "Date of the report.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "currency": {"name": "currency", "description": "This currency value should match the respective organization's currency value.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "taps": {"name": "taps", "description": "Number of taps on ad group on given day.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "new_downloads": {"name": "new_downloads", "description": "App downloads from new users who have never before installed app of ad group in a given day.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "redownloads": {"name": "redownloads", "description": "Number of user downloads where user deletes app 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 of ad group in a given day.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_downloads": {"name": "total_downloads", "description": "The sum of new_downloads and redownloads.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "impressions": {"name": "impressions", "description": "The number of impressions of ad group in a given day.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "spend": {"name": "spend", "description": "The spend on ad group in the given day.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": "apple_search_ads://models/apple_search_ads.yml", "compiled_path": "target/compiled/apple_search_ads/models/apple_search_ads__ad_group_report.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "apple_search_ads", "materialized": "table", "enabled": true}, "created_at": 1666728757.962782, "compiled_code": "\n\nwith report as (\n\n select *\n from `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__ad_group_report`\n), \n\nad_group as (\n\n select * \n from `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__ad_group_history`\n where is_most_recent_record = True\n), \n\ncampaign as (\n\n select *\n from `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__campaign_history`\n where is_most_recent_record = True\n), \n\norganization as (\n\n select * \n from `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__organization`\n), \n\njoined as (\n\n select \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.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,\n sum(report.redownloads) as redownloads,\n sum(report.new_downloads + report.redownloads) as total_downloads,\n sum(report.impressions) as impressions,\n sum(report.spend) as spend\n\n \n\n\n\n\n from report\n join ad_group \n on report.ad_group_id = ad_group.ad_group_id\n join campaign \n on ad_group.campaign_id = campaign.campaign_id\n join organization \n on ad_group.organization_id = organization.organization_id\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": [], "relation_name": "`dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads`.`apple_search_ads__ad_group_report`"}, "model.apple_search_ads.apple_search_ads__keyword_report": {"compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.fivetran_utils.persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__keyword_report", "model.apple_search_ads_source.stg_apple_search_ads__keyword_history", "model.apple_search_ads_source.stg_apple_search_ads__ad_group_history", "model.apple_search_ads_source.stg_apple_search_ads__campaign_history", "model.apple_search_ads_source.stg_apple_search_ads__organization"]}, "config": {"enabled": true, "alias": null, "schema": "apple_search_ads", "database": null, "tags": [], "meta": {}, "materialized": "table", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests_apple_search_ads", "fqn": ["apple_search_ads", "apple_search_ads__keyword_report"], "unique_id": "model.apple_search_ads.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 {{ var('keyword_report') }}\n), \n\nkeyword as (\n\n select *\n from {{ var('keyword_history') }}\n where is_most_recent_record = True\n), \n\nad_group as (\n\n select *\n from {{ var('ad_group_history') }}\n where is_most_recent_record = True\n), \n\ncampaign as (\n\n select *\n from {{ var('campaign_history') }}\n where is_most_recent_record = True\n), \n\norganization as (\n\n select * \n from {{ var('organization') }}\n), \n\njoined as (\n\n select \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 keyword.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,\n sum(report.redownloads) as redownloads,\n sum(report.new_downloads + report.redownloads) as total_downloads,\n sum(report.impressions) as impressions,\n sum(report.spend) as spend\n\n {{ fivetran_utils.persist_pass_through_columns(pass_through_variable='apple_search_ads__keyword_passthrough_metrics', transform = 'sum') }}\n from report\n join keyword \n on report.keyword_id = keyword.keyword_id\n join ad_group \n on keyword.ad_group_id = ad_group.ad_group_id\n join campaign \n on ad_group.campaign_id = campaign.campaign_id\n join organization \n on ad_group.organization_id = organization.organization_id\n {{ dbt_utils.group_by(12) }}\n)\n\nselect * \nfrom joined", "language": "sql", "package_name": "apple_search_ads", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads", "path": "apple_search_ads__keyword_report.sql", "original_file_path": "models/apple_search_ads__keyword_report.sql", "name": "apple_search_ads__keyword_report", "alias": "apple_search_ads__keyword_report", "checksum": {"name": "sha256", "checksum": "91250ca8167dc8fee98582ff093d56a498b854e5c66a51325076191016bfb0e7"}, "tags": [], "refs": [["stg_apple_search_ads__keyword_report"], ["stg_apple_search_ads__keyword_history"], ["stg_apple_search_ads__ad_group_history"], ["stg_apple_search_ads__campaign_history"], ["stg_apple_search_ads__organization"]], "sources": [], "metrics": [], "description": "Each record represents the daily ad performance of each creative set.", "columns": {"organization_id": {"name": "organization_id", "description": "Organization ID associated with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "organization_name": {"name": "organization_name", "description": "Organization name associated with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_id": {"name": "campaign_id", "description": "Campaign ID associated with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_name": {"name": "campaign_name", "description": "Campaign name associated with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "ad_group_id": {"name": "ad_group_id", "description": "Ad group ID associated with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "ad_group_name": {"name": "ad_group_name", "description": "Ad group name associated with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "keyword_id": {"name": "keyword_id", "description": "Creative set name associatd with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "keyword_text": {"name": "keyword_text", "description": "Creative set ID associated with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "match_type": {"name": "match_type", "description": "Controls how ads are matched to user searches; EXACT or BROAD.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "date_day": {"name": "date_day", "description": "Date of the report.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "currency": {"name": "currency", "description": "This currency value should match the respective organization's currency value.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "keyword_status": {"name": "keyword_status", "description": "The status of the keyword associated with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "taps": {"name": "taps", "description": "Number of taps on keyword on given day.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "new_downloads": {"name": "new_downloads", "description": "App downloads from new users who have never before installed app of keyword in a given day.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "redownloads": {"name": "redownloads", "description": "Number of user downloads where user deletes app 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 of keyword in a given day.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_downloads": {"name": "total_downloads", "description": "The sum of new_downloads and redownloads.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "impressions": {"name": "impressions", "description": "The number of impressions of keyword in a given day.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "spend": {"name": "spend", "description": "The spend on keyword in the given day.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": "apple_search_ads://models/apple_search_ads.yml", "compiled_path": "target/compiled/apple_search_ads/models/apple_search_ads__keyword_report.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "apple_search_ads", "materialized": "table", "enabled": true}, "created_at": 1666728758.013998, "compiled_code": "\n\nwith report as (\n\n select *\n from `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__keyword_report`\n), \n\nkeyword as (\n\n select *\n from `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__keyword_history`\n where is_most_recent_record = True\n), \n\nad_group as (\n\n select *\n from `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__ad_group_history`\n where is_most_recent_record = True\n), \n\ncampaign as (\n\n select *\n from `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__campaign_history`\n where is_most_recent_record = True\n), \n\norganization as (\n\n select * \n from `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__organization`\n), \n\njoined as (\n\n select \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 keyword.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,\n sum(report.redownloads) as redownloads,\n sum(report.new_downloads + report.redownloads) as total_downloads,\n sum(report.impressions) as impressions,\n sum(report.spend) as spend\n\n \n\n\n\n\n from report\n join keyword \n on report.keyword_id = keyword.keyword_id\n join ad_group \n on keyword.ad_group_id = ad_group.ad_group_id\n join campaign \n on ad_group.campaign_id = campaign.campaign_id\n join organization \n on ad_group.organization_id = organization.organization_id\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": [], "relation_name": "`dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads`.`apple_search_ads__keyword_report`"}, "model.apple_search_ads.apple_search_ads__search_term_report": {"compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.fivetran_utils.persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__search_term_report", "model.apple_search_ads_source.stg_apple_search_ads__campaign_history", "model.apple_search_ads_source.stg_apple_search_ads__organization"]}, "config": {"enabled": true, "alias": null, "schema": "apple_search_ads", "database": null, "tags": [], "meta": {}, "materialized": "table", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests_apple_search_ads", "fqn": ["apple_search_ads", "apple_search_ads__search_term_report"], "unique_id": "model.apple_search_ads.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 {{ var('search_term_report') }}\n), \n\ncampaign as (\n\n select *\n from {{ var('campaign_history') }}\n where is_most_recent_record = True\n), \n\norganization as (\n\n select * \n from {{ var('organization') }}\n), \n\njoined as (\n\n select \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 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,\n sum(report.redownloads) as redownloads,\n sum(report.new_downloads + report.redownloads) as total_downloads,\n sum(report.impressions) as impressions,\n sum(report.spend) as spend\n\n {{ fivetran_utils.persist_pass_through_columns(pass_through_variable='apple_search_ads__search_term_passthrough_metrics', transform = 'sum') }}\n from report\n join campaign \n on report.campaign_id = campaign.campaign_id\n join organization \n on campaign.organization_id = organization.organization_id\n where report.search_term_text is not null\n {{ dbt_utils.group_by(12) }}\n)\n\nselect * \nfrom joined", "language": "sql", "package_name": "apple_search_ads", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads", "path": "apple_search_ads__search_term_report.sql", "original_file_path": "models/apple_search_ads__search_term_report.sql", "name": "apple_search_ads__search_term_report", "alias": "apple_search_ads__search_term_report", "checksum": {"name": "sha256", "checksum": "4827d710dac6b2e632dcf3ba421a8166d719d1ae59e98128736b8689cf4039a1"}, "tags": [], "refs": [["stg_apple_search_ads__search_term_report"], ["stg_apple_search_ads__campaign_history"], ["stg_apple_search_ads__organization"]], "sources": [], "metrics": [], "description": "Each record represents the daily ad performance of each search term, only includes records with search term values.", "columns": {"organization_id": {"name": "organization_id", "description": "Organization ID associated with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "organization_name": {"name": "organization_name", "description": "Organization name associated with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_id": {"name": "campaign_id", "description": "Campaign ID associated with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_name": {"name": "campaign_name", "description": "Campaign name associated with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "ad_group_id": {"name": "ad_group_id", "description": "Ad group ID associated with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "ad_group_name": {"name": "ad_group_name", "description": "Ad group name associated with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "match_type": {"name": "match_type", "description": "Controls how ads are matched to user searches; EXACT or BROAD.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "date_day": {"name": "date_day", "description": "Date of the report.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "search_term_text": {"name": "search_term_text", "description": "Search term text.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "currency": {"name": "currency", "description": "This currency value should match the respective organization's currency value.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "taps": {"name": "taps", "description": "Number of taps on organization on given day.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "new_downloads": {"name": "new_downloads", "description": "App downloads from new users who have never before installed app of organization in a given day.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "redownloads": {"name": "redownloads", "description": "Number of user downloads where user deletes app 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 of organization in a given day.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_downloads": {"name": "total_downloads", "description": "The sum of new_downloads and redownloads.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "impressions": {"name": "impressions", "description": "The number of impressions of organization in a given day.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "spend": {"name": "spend", "description": "The spend on organization in the given day.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": "apple_search_ads://models/apple_search_ads.yml", "compiled_path": "target/compiled/apple_search_ads/models/apple_search_ads__search_term_report.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "apple_search_ads", "materialized": "table", "enabled": true}, "created_at": 1666728758.017817, "compiled_code": "\n\nwith report as (\n\n select *\n from `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__search_term_report`\n), \n\ncampaign as (\n\n select *\n from `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__campaign_history`\n where is_most_recent_record = True\n), \n\norganization as (\n\n select * \n from `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__organization`\n), \n\njoined as (\n\n select \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 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,\n sum(report.redownloads) as redownloads,\n sum(report.new_downloads + report.redownloads) as total_downloads,\n sum(report.impressions) as impressions,\n sum(report.spend) as spend\n\n \n\n\n\n\n from report\n join campaign \n on report.campaign_id = campaign.campaign_id\n join organization \n on campaign.organization_id = organization.organization_id\n where report.search_term_text is not null\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": [], "relation_name": "`dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads`.`apple_search_ads__search_term_report`"}, "model.apple_search_ads.apple_search_ads__campaign_report": {"compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.fivetran_utils.persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__campaign_report", "model.apple_search_ads_source.stg_apple_search_ads__campaign_history", "model.apple_search_ads_source.stg_apple_search_ads__organization"]}, "config": {"enabled": true, "alias": null, "schema": "apple_search_ads", "database": null, "tags": [], "meta": {}, "materialized": "table", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests_apple_search_ads", "fqn": ["apple_search_ads", "apple_search_ads__campaign_report"], "unique_id": "model.apple_search_ads.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 {{ var('campaign_report') }}\n\n), \n\ncampaign as (\n\n select *\n from {{ var('campaign_history') }}\n where is_most_recent_record = True\n), \n\norganization as (\n\n select * \n from {{ var('organization') }}\n\n), \n\njoined as (\n\n select \n report.date_day,\n campaign.organization_id,\n organization.organization_name,\n campaign.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,\n sum(report.redownloads) as redownloads,\n sum(report.new_downloads + report.redownloads) as total_downloads,\n sum(report.impressions) as impressions,\n sum(report.spend) as spend\n\n {{ fivetran_utils.persist_pass_through_columns(pass_through_variable='apple_search_ads__campaign_passthrough_metrics', transform = 'sum') }}\n from report\n join campaign \n on report.campaign_id = campaign.campaign_id\n join organization \n on campaign.organization_id = organization.organization_id\n {{ dbt_utils.group_by(9) }}\n)\n\nselect * \nfrom joined", "language": "sql", "package_name": "apple_search_ads", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads", "path": "apple_search_ads__campaign_report.sql", "original_file_path": "models/apple_search_ads__campaign_report.sql", "name": "apple_search_ads__campaign_report", "alias": "apple_search_ads__campaign_report", "checksum": {"name": "sha256", "checksum": "d555ffbfe1f914afd50ba592ab961f1ebdb40a4d4315c0696f1c80738930080f"}, "tags": [], "refs": [["stg_apple_search_ads__campaign_report"], ["stg_apple_search_ads__campaign_history"], ["stg_apple_search_ads__organization"]], "sources": [], "metrics": [], "description": "Each record represents the daily ad performance of each campaign.", "columns": {"organization_id": {"name": "organization_id", "description": "Organization ID associated with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "organization_name": {"name": "organization_name", "description": "Organization name associated with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_id": {"name": "campaign_id", "description": "Campaign ID associated with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_name": {"name": "campaign_name", "description": "Campaign name associated with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_status": {"name": "campaign_status", "description": "The status of the campaign associted with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "start_at": {"name": "start_at", "description": "The start timestamp of this campaign.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "end_at": {"name": "end_at", "description": "The end timestamp of this campaign.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "date_day": {"name": "date_day", "description": "Date of the report.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "currency": {"name": "currency", "description": "This currency value should match the respective organization's currency value.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "taps": {"name": "taps", "description": "Number of taps on campaign on given day.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "new_downloads": {"name": "new_downloads", "description": "App downloads from new users who have never before installed app of campaign in a given day.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "redownloads": {"name": "redownloads", "description": "Number of user downloads where user deletes app 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 of campaign in a given day.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_downloads": {"name": "total_downloads", "description": "The sum of new_downloads and redownloads.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "impressions": {"name": "impressions", "description": "The number of impressions of campaign in a given day.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "spend": {"name": "spend", "description": "The spend on campaign in the given day.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": "apple_search_ads://models/apple_search_ads.yml", "compiled_path": "target/compiled/apple_search_ads/models/apple_search_ads__campaign_report.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "apple_search_ads", "materialized": "table", "enabled": true}, "created_at": 1666728758.011362, "compiled_code": "\n\nwith report as (\n \n select *\n from `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__campaign_report`\n\n), \n\ncampaign as (\n\n select *\n from `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__campaign_history`\n where is_most_recent_record = True\n), \n\norganization as (\n\n select * \n from `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__organization`\n\n), \n\njoined as (\n\n select \n report.date_day,\n campaign.organization_id,\n organization.organization_name,\n campaign.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,\n sum(report.redownloads) as redownloads,\n sum(report.new_downloads + report.redownloads) as total_downloads,\n sum(report.impressions) as impressions,\n sum(report.spend) as spend\n\n \n\n\n\n\n from report\n join campaign \n on report.campaign_id = campaign.campaign_id\n join organization \n on campaign.organization_id = organization.organization_id\n group by 1,2,3,4,5,6,7,8,9\n)\n\nselect * \nfrom joined", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads`.`apple_search_ads__campaign_report`"}, "model.apple_search_ads.apple_search_ads__organization_report": {"compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.fivetran_utils.persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__campaign_report", "model.apple_search_ads_source.stg_apple_search_ads__campaign_history", "model.apple_search_ads_source.stg_apple_search_ads__organization"]}, "config": {"enabled": true, "alias": null, "schema": "apple_search_ads", "database": null, "tags": [], "meta": {}, "materialized": "table", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests_apple_search_ads", "fqn": ["apple_search_ads", "apple_search_ads__organization_report"], "unique_id": "model.apple_search_ads.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 {{ var('campaign_report') }}\n), \n\ncampaign as (\n\n select *\n from {{ var('campaign_history') }}\n where is_most_recent_record = True\n), \n\norganization as (\n\n select * \n from {{ var('organization') }}\n), \n\njoined as (\n\n select \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,\n sum(report.redownloads) as redownloads,\n sum(report.new_downloads + report.redownloads) as total_downloads,\n sum(report.impressions) as impressions,\n sum(report.spend) as spend\n\n {{ fivetran_utils.persist_pass_through_columns(pass_through_variable='apple_search_ads__campaign_passthrough_metrics', transform = 'sum') }}\n from report\n join campaign \n on report.campaign_id = campaign.campaign_id\n join organization \n on campaign.organization_id = organization.organization_id\n {{ dbt_utils.group_by(4) }}\n)\n\nselect * \nfrom joined", "language": "sql", "package_name": "apple_search_ads", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads", "path": "apple_search_ads__organization_report.sql", "original_file_path": "models/apple_search_ads__organization_report.sql", "name": "apple_search_ads__organization_report", "alias": "apple_search_ads__organization_report", "checksum": {"name": "sha256", "checksum": "47084fe8809edaeeda722e20590b19c6488687d05ad654b8fef4a0021088e0a2"}, "tags": [], "refs": [["stg_apple_search_ads__campaign_report"], ["stg_apple_search_ads__campaign_history"], ["stg_apple_search_ads__organization"]], "sources": [], "metrics": [], "description": "Each record represents the daily ad performance of each organization.", "columns": {"organization_id": {"name": "organization_id", "description": "Organization ID associated with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "organization_name": {"name": "organization_name", "description": "Organization name associated with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "date_day": {"name": "date_day", "description": "Date of the report.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "currency": {"name": "currency", "description": "This currency value should match the respective organization's currency value.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "taps": {"name": "taps", "description": "Number of taps on organization on given day.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "new_downloads": {"name": "new_downloads", "description": "App downloads from new users who have never before installed app of organization in a given day.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "redownloads": {"name": "redownloads", "description": "Number of user downloads where user deletes app 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 of organization in a given day.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_downloads": {"name": "total_downloads", "description": "The sum of new_downloads and redownloads.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "impressions": {"name": "impressions", "description": "The number of impressions of organization in a given day.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "spend": {"name": "spend", "description": "The spend on organization in the given day.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": "apple_search_ads://models/apple_search_ads.yml", "compiled_path": "target/compiled/apple_search_ads/models/apple_search_ads__organization_report.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "apple_search_ads", "materialized": "table", "enabled": true}, "created_at": 1666728758.015523, "compiled_code": "\n\nwith report as (\n \n select *\n from `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__campaign_report`\n), \n\ncampaign as (\n\n select *\n from `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__campaign_history`\n where is_most_recent_record = True\n), \n\norganization as (\n\n select * \n from `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__organization`\n), \n\njoined as (\n\n select \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,\n sum(report.redownloads) as redownloads,\n sum(report.new_downloads + report.redownloads) as total_downloads,\n sum(report.impressions) as impressions,\n sum(report.spend) as spend\n\n \n\n\n\n\n from report\n join campaign \n on report.campaign_id = campaign.campaign_id\n join organization \n on campaign.organization_id = organization.organization_id\n group by 1,2,3,4\n)\n\nselect * \nfrom joined", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads`.`apple_search_ads__organization_report`"}, "model.apple_search_ads_source.stg_apple_search_ads__campaign_history": {"compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.apple_search_ads_source.get_campaign_history_columns", "macro.fivetran_utils.fill_staging_columns"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__campaign_history_tmp", "model.apple_search_ads_source.stg_apple_search_ads__campaign_history_tmp"]}, "config": {"enabled": true, "alias": null, "schema": "apple_search_ads_source", "database": null, "tags": [], "meta": {}, "materialized": "table", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "fqn": ["apple_search_ads_source", "stg_apple_search_ads__campaign_history"], "unique_id": "model.apple_search_ads_source.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 from base\n),\n\nfinal as (\n \n select\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", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "stg_apple_search_ads__campaign_history.sql", "original_file_path": "models/stg_apple_search_ads__campaign_history.sql", "name": "stg_apple_search_ads__campaign_history", "alias": "stg_apple_search_ads__campaign_history", "checksum": {"name": "sha256", "checksum": "294e54bc10f47e44786be1c445e764b49464643d75c0bf7a4fc3a38f3868e0de"}, "tags": [], "refs": [["stg_apple_search_ads__campaign_history_tmp"], ["stg_apple_search_ads__campaign_history_tmp"]], "sources": [], "metrics": [], "description": "Each record represents a version of a campaign in Apple Search Ads.", "columns": {"modified_at": {"name": "modified_at", "description": "Timestamp of when the campaign object was last modified.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "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, "quote": null, "tags": []}, "campaign_id": {"name": "campaign_id", "description": "Campaign ID associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "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, "quote": null, "tags": []}, "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, "quote": null, "tags": []}, "campaign_name": {"name": "campaign_name", "description": "Campaign name for the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "organization_id": {"name": "organization_id", "description": "Organization ID associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "status": {"name": "status", "description": "The current status of the campaign, values include ENABLED and PAUSED.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": "apple_search_ads_source://models/stg_apple_search_ads.yml", "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads__campaign_history.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "apple_search_ads_source", "materialized": "table", "enabled": true}, "created_at": 1666728758.082039, "compiled_code": "\n\nwith base as (\n\n select * \n from `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__campaign_history_tmp`\n),\n\nfields as (\n\n select\n \n \n \n end_time\n \n as \n \n end_time\n \n, \n \n \n id\n \n as \n \n id\n \n, \n \n \n modification_time\n \n as \n \n modification_time\n \n, \n \n \n name\n \n as \n \n name\n \n, \n \n \n organization_id\n \n as \n \n organization_id\n \n, \n \n \n start_time\n \n as \n \n start_time\n \n, \n \n \n status\n \n as \n \n status\n \n\n\n\n \n from base\n),\n\nfinal as (\n \n select\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": [], "relation_name": "`dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__campaign_history`"}, "model.apple_search_ads_source.stg_apple_search_ads__ad_report": {"compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.apple_search_ads_source.get_ad_level_report_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.fill_pass_through_columns"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__ad_report_tmp", "model.apple_search_ads_source.stg_apple_search_ads__ad_report_tmp"]}, "config": {"enabled": true, "alias": null, "schema": "apple_search_ads_source", "database": null, "tags": [], "meta": {}, "materialized": "table", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "fqn": ["apple_search_ads_source", "stg_apple_search_ads__ad_report"], "unique_id": "model.apple_search_ads_source.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 from base\n),\n\nfinal as (\n \n select \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 new_downloads,\n redownloads,\n taps\n\n {{ fivetran_utils.fill_pass_through_columns('apple_search_ads__ad_passthrough_metrics') }}\n from fields\n)\n\nselect *\nfrom final", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "stg_apple_search_ads__ad_report.sql", "original_file_path": "models/stg_apple_search_ads__ad_report.sql", "name": "stg_apple_search_ads__ad_report", "alias": "stg_apple_search_ads__ad_report", "checksum": {"name": "sha256", "checksum": "45019dc2d949eecadbbd9d4a052049a60dca00c32f726da678972fa8bdadd1f6"}, "tags": [], "refs": [["stg_apple_search_ads__ad_report_tmp"], ["stg_apple_search_ads__ad_report_tmp"]], "sources": [], "metrics": [], "description": "Each record represents the daily performance of an ad in Apple Search Ads.", "columns": {"date_day": {"name": "date_day", "description": "Date for daily report aggregation.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_id": {"name": "campaign_id", "description": "Campaign ID associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "ad_group_id": {"name": "ad_group_id", "description": "Ad group ID associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "ad_id": {"name": "ad_id", "description": "Ad ID associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "impressions": {"name": "impressions", "description": "Number of times your ad appeared in App Store search results.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "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, "quote": null, "tags": []}, "currency": {"name": "currency", "description": "This currency value should match the respective organization's currency value.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "new_downloads": {"name": "new_downloads", "description": "App downloads from new users who have never before installed the respective app.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "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.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "taps": {"name": "taps", "description": "The number of times ad was tapped by users within the reporting time period.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": "apple_search_ads_source://models/stg_apple_search_ads.yml", "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads__ad_report.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "apple_search_ads_source", "materialized": "table", "enabled": true}, "created_at": 1666728758.080736, "compiled_code": "\n\nwith base as (\n\n select * \n from `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__ad_report_tmp`\n),\n\nfields as (\n\n select\n \n \n \n ad_group_id\n \n as \n \n ad_group_id\n \n, \n \n \n ad_id\n \n as \n \n ad_id\n \n, \n \n \n campaign_id\n \n as \n \n campaign_id\n \n, \n \n \n date\n \n as \n \n date\n \n, \n \n \n impressions\n \n as \n \n impressions\n \n, \n \n \n local_spend_amount\n \n as \n \n local_spend_amount\n \n, \n \n \n local_spend_currency\n \n as \n \n local_spend_currency\n \n, \n \n \n new_downloads\n \n as \n \n new_downloads\n \n, \n \n \n redownloads\n \n as \n \n redownloads\n \n, \n \n \n taps\n \n as \n \n taps\n \n\n\n\n from base\n),\n\nfinal as (\n \n select \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 new_downloads,\n redownloads,\n taps\n\n \n\n\n\n\n from fields\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__ad_report`"}, "model.apple_search_ads_source.stg_apple_search_ads__campaign_report": {"compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.apple_search_ads_source.get_campaign_report_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.fill_pass_through_columns"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__campaign_report_tmp", "model.apple_search_ads_source.stg_apple_search_ads__campaign_report_tmp"]}, "config": {"enabled": true, "alias": null, "schema": "apple_search_ads_source", "database": null, "tags": [], "meta": {}, "materialized": "table", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "fqn": ["apple_search_ads_source", "stg_apple_search_ads__campaign_report"], "unique_id": "model.apple_search_ads_source.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 from base\n),\n\nfinal as (\n \n select \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 new_downloads,\n redownloads,\n taps\n\n {{ fivetran_utils.fill_pass_through_columns('apple_search_ads__campaign_passthrough_metrics') }}\n from fields\n)\n\nselect * \nfrom final", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "stg_apple_search_ads__campaign_report.sql", "original_file_path": "models/stg_apple_search_ads__campaign_report.sql", "name": "stg_apple_search_ads__campaign_report", "alias": "stg_apple_search_ads__campaign_report", "checksum": {"name": "sha256", "checksum": "c4681d203c58d68501b9d2d3a84fc28598e9705eb4cc7f4496be52e3209768d3"}, "tags": [], "refs": [["stg_apple_search_ads__campaign_report_tmp"], ["stg_apple_search_ads__campaign_report_tmp"]], "sources": [], "metrics": [], "description": "Each record represents the daily performance of a campaign in Apple Search Ads.", "columns": {"campaign_id": {"name": "campaign_id", "description": "Campaign ID associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "date_day": {"name": "date_day", "description": "Date for daily report aggregation.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "impressions": {"name": "impressions", "description": "Number of times your ad appeared in App Store search results.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "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, "quote": null, "tags": []}, "currency": {"name": "currency", "description": "This currency value should match the respective organization's currency value.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "new_downloads": {"name": "new_downloads", "description": "App downloads from new users who have never before installed the respective app.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "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.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "taps": {"name": "taps", "description": "The number of times ad was tapped by users within the reporting time period.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": "apple_search_ads_source://models/stg_apple_search_ads.yml", "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads__campaign_report.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "apple_search_ads_source", "materialized": "table", "enabled": true}, "created_at": 1666728758.0832498, "compiled_code": "\n\nwith base as (\n\n select * \n from `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__campaign_report_tmp`\n),\n\nfields as (\n\n select\n \n \n \n date\n \n as \n \n date\n \n, \n \n \n id\n \n as \n \n id\n \n, \n \n \n impressions\n \n as \n \n impressions\n \n, \n \n \n local_spend_amount\n \n as \n \n local_spend_amount\n \n, \n \n \n local_spend_currency\n \n as \n \n local_spend_currency\n \n, \n \n \n new_downloads\n \n as \n \n new_downloads\n \n, \n \n \n redownloads\n \n as \n \n redownloads\n \n, \n \n \n taps\n \n as \n \n taps\n \n\n\n\n from base\n),\n\nfinal as (\n \n select \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 new_downloads,\n redownloads,\n taps\n\n \n\n\n\n\n from fields\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__campaign_report`"}, "model.apple_search_ads_source.stg_apple_search_ads__organization": {"compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.apple_search_ads_source.get_organization_columns", "macro.fivetran_utils.fill_staging_columns"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__organization_tmp", "model.apple_search_ads_source.stg_apple_search_ads__organization_tmp"]}, "config": {"enabled": true, "alias": null, "schema": "apple_search_ads_source", "database": null, "tags": [], "meta": {}, "materialized": "table", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "fqn": ["apple_search_ads_source", "stg_apple_search_ads__organization"], "unique_id": "model.apple_search_ads_source.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 from base\n),\n\nfinal as (\n \n select \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", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "stg_apple_search_ads__organization.sql", "original_file_path": "models/stg_apple_search_ads__organization.sql", "name": "stg_apple_search_ads__organization", "alias": "stg_apple_search_ads__organization", "checksum": {"name": "sha256", "checksum": "24d3ee4e2d050e8ade0b3222ea535ed1837d2ea4265f00cf3f3b7b67a7a30dab"}, "tags": [], "refs": [["stg_apple_search_ads__organization_tmp"], ["stg_apple_search_ads__organization_tmp"]], "sources": [], "metrics": [], "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, "quote": null, "tags": []}, "currency": {"name": "currency", "description": "Specified currency for respective organization.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "payment_model": {"name": "payment_model", "description": "Values include 'LOC', 'PAYG' or (payment method hasn't been set).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "organization_name": {"name": "organization_name", "description": "Name of organization.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "time_zone": {"name": "time_zone", "description": "Organization default timezone; values can be ORTZ or UTC.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": "apple_search_ads_source://models/stg_apple_search_ads.yml", "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads__organization.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "apple_search_ads_source", "materialized": "table", "enabled": true}, "created_at": 1666728758.087004, "compiled_code": "\n\nwith base as (\n\n select * \n from `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__organization_tmp`\n),\n\nfields as (\n\n select\n \n \n \n currency\n \n as \n \n currency\n \n, \n \n \n id\n \n as \n \n id\n \n, \n \n \n name\n \n as \n \n name\n \n, \n \n \n payment_model\n \n as \n \n payment_model\n \n, \n \n \n time_zone\n \n as \n \n time_zone\n \n\n\n\n \n from base\n),\n\nfinal as (\n \n select \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": [], "relation_name": "`dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__organization`"}, "model.apple_search_ads_source.stg_apple_search_ads__keyword_report": {"compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.apple_search_ads_source.get_keyword_report_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.fill_pass_through_columns"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__keyword_report_tmp", "model.apple_search_ads_source.stg_apple_search_ads__keyword_report_tmp"]}, "config": {"enabled": true, "alias": null, "schema": "apple_search_ads_source", "database": null, "tags": [], "meta": {}, "materialized": "table", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "fqn": ["apple_search_ads_source", "stg_apple_search_ads__keyword_report"], "unique_id": "model.apple_search_ads_source.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 from base\n),\n\nfinal as (\n \n select \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 new_downloads,\n redownloads,\n taps\n\n {{ fivetran_utils.fill_pass_through_columns('apple_search_ads__keyword_passthrough_metrics') }}\n from fields\n)\n\nselect * \nfrom final", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "stg_apple_search_ads__keyword_report.sql", "original_file_path": "models/stg_apple_search_ads__keyword_report.sql", "name": "stg_apple_search_ads__keyword_report", "alias": "stg_apple_search_ads__keyword_report", "checksum": {"name": "sha256", "checksum": "087cf73b201edc946f1b30c28096f4d513aca817fc3e510cac05f28dc781c665"}, "tags": [], "refs": [["stg_apple_search_ads__keyword_report_tmp"], ["stg_apple_search_ads__keyword_report_tmp"]], "sources": [], "metrics": [], "description": "Each record represents the daily performance of a keyword in Apple Search Ads.", "columns": {"keyword_id": {"name": "keyword_id", "description": "Keyword ID associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "date_day": {"name": "date_day", "description": "Date for daily report aggregation.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "impressions": {"name": "impressions", "description": "Number of times your ad appeared in App Store search results.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "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, "quote": null, "tags": []}, "currency": {"name": "currency", "description": "This currency value should match the respective organization's currency value.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "new_downloads": {"name": "new_downloads", "description": "App downloads from new users who have never before installed the respective app.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "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.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "taps": {"name": "taps", "description": "The number of times ad was tapped by users within the reporting time period.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": "apple_search_ads_source://models/stg_apple_search_ads.yml", "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads__keyword_report.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "apple_search_ads_source", "materialized": "table", "enabled": true}, "created_at": 1666728758.086155, "compiled_code": "\n\nwith base as (\n\n select * \n from `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__keyword_report_tmp`\n),\n\nfields as (\n\n select\n \n \n \n date\n \n as \n \n date\n \n, \n \n \n id\n \n as \n \n id\n \n, \n \n \n impressions\n \n as \n \n impressions\n \n, \n \n \n local_spend_amount\n \n as \n \n local_spend_amount\n \n, \n \n \n local_spend_currency\n \n as \n \n local_spend_currency\n \n, \n \n \n new_downloads\n \n as \n \n new_downloads\n \n, \n \n \n redownloads\n \n as \n \n redownloads\n \n, \n \n \n taps\n \n as \n \n taps\n \n\n\n \n from base\n),\n\nfinal as (\n \n select \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 new_downloads,\n redownloads,\n taps\n\n \n\n\n\n\n from fields\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__keyword_report`"}, "model.apple_search_ads_source.stg_apple_search_ads__keyword_history": {"compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.apple_search_ads_source.get_keyword_history_columns", "macro.fivetran_utils.fill_staging_columns"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__keyword_history_tmp", "model.apple_search_ads_source.stg_apple_search_ads__keyword_history_tmp"]}, "config": {"enabled": true, "alias": null, "schema": "apple_search_ads_source", "database": null, "tags": [], "meta": {}, "materialized": "table", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "fqn": ["apple_search_ads_source", "stg_apple_search_ads__keyword_history"], "unique_id": "model.apple_search_ads_source.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 from base\n),\n\nfinal as (\n \n select \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", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "stg_apple_search_ads__keyword_history.sql", "original_file_path": "models/stg_apple_search_ads__keyword_history.sql", "name": "stg_apple_search_ads__keyword_history", "alias": "stg_apple_search_ads__keyword_history", "checksum": {"name": "sha256", "checksum": "5ee576e97a5fffaf97916376ca747fcb9389b6733d268f9b42308a8f244ade8e"}, "tags": [], "refs": [["stg_apple_search_ads__keyword_history_tmp"], ["stg_apple_search_ads__keyword_history_tmp"]], "sources": [], "metrics": [], "description": "Each record represents a version of a keyword in Apple Search Ads.", "columns": {"modified_at": {"name": "modified_at", "description": "Timestamp of when the keyword object was last modified.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "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, "quote": null, "tags": []}, "keyword_id": {"name": "keyword_id", "description": "Keyword ID associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_id": {"name": "campaign_id", "description": "Campaign ID associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "ad_group_id": {"name": "ad_group_id", "description": "Ad group ID associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "bid_amount": {"name": "bid_amount", "description": "The bid amount to display your ad for the matching text value.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "bid_currency": {"name": "bid_currency", "description": "This currency value should match the respective organization's currency value.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "match_type": {"name": "match_type", "description": "Controls how ads are matched to user searches; EXACT or BROAD.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "status": {"name": "status", "description": "The current status of the keyword, values include ENABLED and PAUSED.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "keyword_text": {"name": "keyword_text", "description": "The word or phrase to match in user searches, to show respective ad.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": "apple_search_ads_source://models/stg_apple_search_ads.yml", "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads__keyword_history.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "apple_search_ads_source", "materialized": "table", "enabled": true}, "created_at": 1666728758.0848188, "compiled_code": "\n\nwith base as (\n\n select * \n from `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__keyword_history_tmp`\n),\n\nfields as (\n\n select\n \n \n \n ad_group_id\n \n as \n \n ad_group_id\n \n, \n \n \n bid_amount\n \n as \n \n bid_amount\n \n, \n \n \n bid_currency\n \n as \n \n bid_currency\n \n, \n \n \n campaign_id\n \n as \n \n campaign_id\n \n, \n \n \n id\n \n as \n \n id\n \n, \n \n \n match_type\n \n as \n \n match_type\n \n, \n \n \n modification_time\n \n as \n \n modification_time\n \n, \n \n \n status\n \n as \n \n status\n \n, \n \n \n text\n \n as \n \n text\n \n\n\n\n \n from base\n),\n\nfinal as (\n \n select \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": [], "relation_name": "`dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__keyword_history`"}, "model.apple_search_ads_source.stg_apple_search_ads__search_term_report": {"compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.apple_search_ads_source.get_search_term_report_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.fill_pass_through_columns"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__search_term_report_tmp", "model.apple_search_ads_source.stg_apple_search_ads__search_term_report_tmp"]}, "config": {"enabled": true, "alias": null, "schema": "apple_search_ads_source", "database": null, "tags": [], "meta": {}, "materialized": "table", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "fqn": ["apple_search_ads_source", "stg_apple_search_ads__search_term_report"], "unique_id": "model.apple_search_ads_source.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 from base\n),\n\nfinal as (\n \n select \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 new_downloads,\n redownloads\n\n {{ fivetran_utils.fill_pass_through_columns('apple_search_ads__search_term_passthrough_metrics') }}\n from fields\n)\n\nselect * \nfrom final", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "stg_apple_search_ads__search_term_report.sql", "original_file_path": "models/stg_apple_search_ads__search_term_report.sql", "name": "stg_apple_search_ads__search_term_report", "alias": "stg_apple_search_ads__search_term_report", "checksum": {"name": "sha256", "checksum": "6345a092b669f3283eb8b09b8590cdcf4e89da7ac486c18bb626315fac6db0e0"}, "tags": [], "refs": [["stg_apple_search_ads__search_term_report_tmp"], ["stg_apple_search_ads__search_term_report_tmp"]], "sources": [], "metrics": [], "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, "quote": null, "tags": []}, "ad_group_id": {"name": "ad_group_id", "description": "Ad group ID associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "ad_format": {"name": "ad_format", "description": "Format of creative set.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_id": {"name": "campaign_id", "description": "Campaign ID associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "date_day": {"name": "date_day", "description": "Date for daily report aggregation.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "ad_group_name": {"name": "ad_group_name", "description": "Ad group name.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "bid_amount": {"name": "bid_amount", "description": "The bid amount to display your ad for the matching text value.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "bid_currency": {"name": "bid_currency", "description": "This currency value should match the respective organization's currency value.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "keyword_text": {"name": "keyword_text", "description": "The word or phrase to match in user searches, to show respective ad.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "keyword_display_status": {"name": "keyword_display_status", "description": "The keyword display status can either be ACTIVE or PAUSED.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "keyword_id": {"name": "keyword_id", "description": "Keyword ID associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "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, "quote": null, "tags": []}, "currency": {"name": "currency", "description": "This currency value should match the respective organization's currency value.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "match_type": {"name": "match_type", "description": "Controls how ads are matched to user searches; values include EXACT, BROAD or AUTO.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "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, "quote": null, "tags": []}, "search_term_text": {"name": "search_term_text", "description": "The word or phrase to match of user searches.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "impressions": {"name": "impressions", "description": "Number of times your ad appeared in App Store search results.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "taps": {"name": "taps", "description": "The number of times ad was tapped by users within the reporting time period.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "new_downloads": {"name": "new_downloads", "description": "App downloads from new users who have never before installed the respective app.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "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.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": "apple_search_ads_source://models/stg_apple_search_ads.yml", "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads__search_term_report.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "apple_search_ads_source", "materialized": "table", "enabled": true}, "created_at": 1666728758.0897431, "compiled_code": "\n\nwith base as (\n\n select * \n from `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__search_term_report_tmp`\n),\n\nfields as (\n\n select\n \n \n \n _fivetran_id\n \n as \n \n _fivetran_id\n \n, \n \n \n ad_group_deleted\n \n as \n \n ad_group_deleted\n \n, \n \n \n ad_group_id\n \n as \n \n ad_group_id\n \n, \n \n \n ad_group_name\n \n as \n \n ad_group_name\n \n, \n \n \n bid_amount_amount\n \n as \n \n bid_amount_amount\n \n, \n \n \n bid_amount_currency\n \n as \n \n bid_amount_currency\n \n, \n \n \n campaign_id\n \n as \n \n campaign_id\n \n, \n \n \n date\n \n as \n \n date\n \n, \n \n \n deleted\n \n as \n \n deleted\n \n, \n \n \n impressions\n \n as \n \n impressions\n \n, \n \n \n keyword\n \n as \n \n keyword\n \n, \n \n \n keyword_display_status\n \n as \n \n keyword_display_status\n \n, \n \n \n keyword_id\n \n as \n \n keyword_id\n \n, \n \n \n local_spend_amount\n \n as \n \n local_spend_amount\n \n, \n \n \n local_spend_currency\n \n as \n \n local_spend_currency\n \n, \n \n \n match_type\n \n as \n \n match_type\n \n, \n \n \n new_downloads\n \n as \n \n new_downloads\n \n, \n \n \n redownloads\n \n as \n \n redownloads\n \n, \n \n \n search_term_source\n \n as \n \n search_term_source\n \n, \n \n \n search_term_text\n \n as \n \n search_term_text\n \n, \n \n \n taps\n \n as \n \n taps\n \n\n\n\n from base\n),\n\nfinal as (\n \n select \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 new_downloads,\n redownloads\n\n \n\n\n\n\n from fields\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__search_term_report`"}, "model.apple_search_ads_source.stg_apple_search_ads__ad_group_history": {"compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.apple_search_ads_source.get_ad_group_history_columns", "macro.fivetran_utils.fill_staging_columns"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__ad_group_history_tmp", "model.apple_search_ads_source.stg_apple_search_ads__ad_group_history_tmp"]}, "config": {"enabled": true, "alias": null, "schema": "apple_search_ads_source", "database": null, "tags": [], "meta": {}, "materialized": "table", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "fqn": ["apple_search_ads_source", "stg_apple_search_ads__ad_group_history"], "unique_id": "model.apple_search_ads_source.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 from base\n),\n\nfinal as (\n select \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", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "stg_apple_search_ads__ad_group_history.sql", "original_file_path": "models/stg_apple_search_ads__ad_group_history.sql", "name": "stg_apple_search_ads__ad_group_history", "alias": "stg_apple_search_ads__ad_group_history", "checksum": {"name": "sha256", "checksum": "b2081179706957545ca7818fd65e298a3948051372426039e2ecffd091fef371"}, "tags": [], "refs": [["stg_apple_search_ads__ad_group_history_tmp"], ["stg_apple_search_ads__ad_group_history_tmp"]], "sources": [], "metrics": [], "description": "Each record represents a version of an ad group in Apple Search Ads.", "columns": {"modified_at": {"name": "modified_at", "description": "Timestamp of when the ad group object was last modified.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "is_most_recent_record": {"name": "is_most_recent_record", "description": "Boolean indicating whether record was the most recent instance.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "ad_group_id": {"name": "ad_group_id", "description": "Ad group ID associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_id": {"name": "campaign_id", "description": "Campaign ID associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "start_at": {"name": "start_at", "description": "The designated ad group start time.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "end_at": {"name": "end_at", "description": "The designated ad group end time.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "ad_group_name": {"name": "ad_group_name", "description": "Ad group name.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "organization_id": {"name": "organization_id", "description": "Organization ID associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "status": {"name": "status", "description": "The current status of the ad group, values include ENABLED and PAUSED.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": "apple_search_ads_source://models/stg_apple_search_ads.yml", "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads__ad_group_history.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "apple_search_ads_source", "materialized": "table", "enabled": true}, "created_at": 1666728758.076621, "compiled_code": "\n\nwith base as (\n\n select * \n from `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__ad_group_history_tmp`\n),\n\nfields as (\n\n select\n \n \n \n campaign_id\n \n as \n \n campaign_id\n \n, \n \n \n end_time\n \n as \n \n end_time\n \n, \n \n \n id\n \n as \n \n id\n \n, \n \n \n modification_time\n \n as \n \n modification_time\n \n, \n \n \n name\n \n as \n \n name\n \n, \n \n \n organization_id\n \n as \n \n organization_id\n \n, \n \n \n start_time\n \n as \n \n start_time\n \n, \n \n \n status\n \n as \n \n status\n \n\n\n\n \n from base\n),\n\nfinal as (\n select \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": [], "relation_name": "`dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__ad_group_history`"}, "model.apple_search_ads_source.stg_apple_search_ads__ad_history": {"compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.apple_search_ads_source.get_ad_history_columns", "macro.fivetran_utils.fill_staging_columns"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__ad_history_tmp", "model.apple_search_ads_source.stg_apple_search_ads__ad_history_tmp"]}, "config": {"enabled": true, "alias": null, "schema": "apple_search_ads_source", "database": null, "tags": [], "meta": {}, "materialized": "table", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "fqn": ["apple_search_ads_source", "stg_apple_search_ads__ad_history"], "unique_id": "model.apple_search_ads_source.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 from base\n),\n\nfinal as (\n \n select \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", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "stg_apple_search_ads__ad_history.sql", "original_file_path": "models/stg_apple_search_ads__ad_history.sql", "name": "stg_apple_search_ads__ad_history", "alias": "stg_apple_search_ads__ad_history", "checksum": {"name": "sha256", "checksum": "4abb76f80d87af32ba976747bb0accf3b1641854a41a3e9d8ebec94533405d23"}, "tags": [], "refs": [["stg_apple_search_ads__ad_history_tmp"], ["stg_apple_search_ads__ad_history_tmp"]], "sources": [], "metrics": [], "description": "Each record represents a version of an ad in Apple Search Ads.", "columns": {"created_at": {"name": "created_at", "description": "Timestamp of when ad was created.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "modified_at": {"name": "modified_at", "description": "Timestamp of when the ad object was last modified.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "organization_id": {"name": "organization_id", "description": "Organization ID associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_id": {"name": "campaign_id", "description": "Campaign ID associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "ad_group_id": {"name": "ad_group_id", "description": "Ad group ID associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "ad_name": {"name": "ad_name", "description": "Ad name associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "ad_id": {"name": "ad_id", "description": "Ad ID associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "ad_status": {"name": "ad_status", "description": "The current status of the ad, values include ENABLED and PAUSED.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": "apple_search_ads_source://models/stg_apple_search_ads.yml", "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads__ad_history.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "apple_search_ads_source", "materialized": "table", "enabled": true}, "created_at": 1666728758.07919, "compiled_code": "\n\nwith base as (\n\n select * \n from `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__ad_history_tmp`\n),\n\nfields as (\n\n select\n \n \n \n ad_group_id\n \n as \n \n ad_group_id\n \n, \n \n \n campaign_id\n \n as \n \n campaign_id\n \n, \n \n \n creation_time\n \n as \n \n creation_time\n \n, \n \n \n id\n \n as \n \n id\n \n, \n \n \n modification_time\n \n as \n \n modification_time\n \n, \n \n \n name\n \n as \n \n name\n \n, \n \n \n org_id\n \n as \n \n org_id\n \n, \n \n \n status\n \n as \n \n status\n \n\n\n\n from base\n),\n\nfinal as (\n \n select \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": [], "relation_name": "`dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__ad_history`"}, "model.apple_search_ads_source.stg_apple_search_ads__ad_group_report": {"compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.apple_search_ads_source.get_ad_group_report_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.fill_pass_through_columns"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__ad_group_report_tmp", "model.apple_search_ads_source.stg_apple_search_ads__ad_group_report_tmp"]}, "config": {"enabled": true, "alias": null, "schema": "apple_search_ads_source", "database": null, "tags": [], "meta": {}, "materialized": "table", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "fqn": ["apple_search_ads_source", "stg_apple_search_ads__ad_group_report"], "unique_id": "model.apple_search_ads_source.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 from base\n),\n\nfinal as (\n \n select\n date as date_day, \n ad_group_id,\n impressions,\n local_spend_amount as spend,\n local_spend_currency as currency,\n new_downloads,\n redownloads,\n taps\n\n {{ fivetran_utils.fill_pass_through_columns('apple_search_ads__ad_group_passthrough_metrics') }}\n from fields\n)\n\nselect * \nfrom final", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "stg_apple_search_ads__ad_group_report.sql", "original_file_path": "models/stg_apple_search_ads__ad_group_report.sql", "name": "stg_apple_search_ads__ad_group_report", "alias": "stg_apple_search_ads__ad_group_report", "checksum": {"name": "sha256", "checksum": "a6f8f1e79e88e2512acd90e2768436ef73939e82acd46b79c0775ba19865147d"}, "tags": [], "refs": [["stg_apple_search_ads__ad_group_report_tmp"], ["stg_apple_search_ads__ad_group_report_tmp"]], "sources": [], "metrics": [], "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, "quote": null, "tags": []}, "date_day": {"name": "date_day", "description": "Date for daily report aggregation.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "impressions": {"name": "impressions", "description": "Number of times your ad appeared in App Store search results.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "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, "quote": null, "tags": []}, "currency": {"name": "currency", "description": "This currency value should match the respective organization's currency value.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "new_downloads": {"name": "new_downloads", "description": "App downloads from new users who have never before installed the respective app.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "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.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "taps": {"name": "taps", "description": "The number of times ad was tapped by users within the reporting time period.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": "apple_search_ads_source://models/stg_apple_search_ads.yml", "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads__ad_group_report.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "apple_search_ads_source", "materialized": "table", "enabled": true}, "created_at": 1666728758.0779579, "compiled_code": "\n\nwith base as (\n\n select * \n from `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__ad_group_report_tmp`\n),\n\nfields as (\n\n select\n \n \n \n ad_group_id\n \n as \n \n ad_group_id\n \n, \n \n \n date\n \n as \n \n date\n \n, \n \n \n impressions\n \n as \n \n impressions\n \n, \n \n \n local_spend_amount\n \n as \n \n local_spend_amount\n \n, \n \n \n local_spend_currency\n \n as \n \n local_spend_currency\n \n, \n \n \n new_downloads\n \n as \n \n new_downloads\n \n, \n \n \n redownloads\n \n as \n \n redownloads\n \n, \n \n \n taps\n \n as \n \n taps\n \n\n\n\n from base\n),\n\nfinal as (\n \n select\n date as date_day, \n ad_group_id,\n impressions,\n local_spend_amount as spend,\n local_spend_currency as currency,\n new_downloads,\n redownloads,\n taps\n\n \n\n\n\n\n from fields\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__ad_group_report`"}, "model.apple_search_ads_source.stg_apple_search_ads__search_term_report_tmp": {"compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars"], "nodes": ["source.apple_search_ads_source.apple_search_ads.search_term_report"]}, "config": {"enabled": true, "alias": null, "schema": "apple_search_ads_source", "database": null, "tags": [], "meta": {}, "materialized": "view", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "fqn": ["apple_search_ads_source", "tmp", "stg_apple_search_ads__search_term_report_tmp"], "unique_id": "model.apple_search_ads_source.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\nselect * \nfrom {{ var('search_term_report') }}", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "tmp/stg_apple_search_ads__search_term_report_tmp.sql", "original_file_path": "models/tmp/stg_apple_search_ads__search_term_report_tmp.sql", "name": "stg_apple_search_ads__search_term_report_tmp", "alias": "stg_apple_search_ads__search_term_report_tmp", "checksum": {"name": "sha256", "checksum": "86f6e99ff5c0373cf5ec106d4011966278601cb5350d588466564e2dca2fa951"}, "tags": [], "refs": [], "sources": [["apple_search_ads", "search_term_report"]], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/tmp/stg_apple_search_ads__search_term_report_tmp.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "apple_search_ads_source", "materialized": "view", "enabled": true}, "created_at": 1666728757.9189298, "compiled_code": "\n\nselect * \nfrom `dbt-package-testing`.`apple_search_ads_integration_tests`.`search_term_report_data`", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__search_term_report_tmp`"}, "model.apple_search_ads_source.stg_apple_search_ads__campaign_history_tmp": {"compiled": true, "resource_type": "model", "depends_on": {"macros": [], "nodes": ["source.apple_search_ads_source.apple_search_ads.campaign_history"]}, "config": {"enabled": true, "alias": null, "schema": "apple_search_ads_source", "database": null, "tags": [], "meta": {}, "materialized": "view", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "fqn": ["apple_search_ads_source", "tmp", "stg_apple_search_ads__campaign_history_tmp"], "unique_id": "model.apple_search_ads_source.stg_apple_search_ads__campaign_history_tmp", "raw_code": "{{ config(enabled=var('ad_reporting__apple_search_ads_enabled', True)) }}\n\nselect * \nfrom {{ var('campaign_history') }}", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "tmp/stg_apple_search_ads__campaign_history_tmp.sql", "original_file_path": "models/tmp/stg_apple_search_ads__campaign_history_tmp.sql", "name": "stg_apple_search_ads__campaign_history_tmp", "alias": "stg_apple_search_ads__campaign_history_tmp", "checksum": {"name": "sha256", "checksum": "e23c062d3d75b890a717ab4047e5a0dccf7c098b3927935df02f76c17acb3ea7"}, "tags": [], "refs": [], "sources": [["apple_search_ads", "campaign_history"]], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/tmp/stg_apple_search_ads__campaign_history_tmp.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "apple_search_ads_source", "materialized": "view", "enabled": true}, "created_at": 1666728757.922335, "compiled_code": "\n\nselect * \nfrom `dbt-package-testing`.`apple_search_ads_integration_tests`.`campaign_history_data`", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__campaign_history_tmp`"}, "model.apple_search_ads_source.stg_apple_search_ads__keyword_history_tmp": {"compiled": true, "resource_type": "model", "depends_on": {"macros": [], "nodes": ["source.apple_search_ads_source.apple_search_ads.keyword_history"]}, "config": {"enabled": true, "alias": null, "schema": "apple_search_ads_source", "database": null, "tags": [], "meta": {}, "materialized": "view", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "fqn": ["apple_search_ads_source", "tmp", "stg_apple_search_ads__keyword_history_tmp"], "unique_id": "model.apple_search_ads_source.stg_apple_search_ads__keyword_history_tmp", "raw_code": "{{ config(enabled=var('ad_reporting__apple_search_ads_enabled', True)) }}\n\nselect * \nfrom {{ var('keyword_history') }}", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "tmp/stg_apple_search_ads__keyword_history_tmp.sql", "original_file_path": "models/tmp/stg_apple_search_ads__keyword_history_tmp.sql", "name": "stg_apple_search_ads__keyword_history_tmp", "alias": "stg_apple_search_ads__keyword_history_tmp", "checksum": {"name": "sha256", "checksum": "852fa9ece91c72dd36f654ce0d71f2af4a1707385c0fa00e3d68e206e4ac456b"}, "tags": [], "refs": [], "sources": [["apple_search_ads", "keyword_history"]], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/tmp/stg_apple_search_ads__keyword_history_tmp.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "apple_search_ads_source", "materialized": "view", "enabled": true}, "created_at": 1666728757.926594, "compiled_code": "\n\nselect * \nfrom `dbt-package-testing`.`apple_search_ads_integration_tests`.`keyword_history_data`", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__keyword_history_tmp`"}, "model.apple_search_ads_source.stg_apple_search_ads__ad_group_history_tmp": {"compiled": true, "resource_type": "model", "depends_on": {"macros": [], "nodes": ["source.apple_search_ads_source.apple_search_ads.ad_group_history"]}, "config": {"enabled": true, "alias": null, "schema": "apple_search_ads_source", "database": null, "tags": [], "meta": {}, "materialized": "view", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "fqn": ["apple_search_ads_source", "tmp", "stg_apple_search_ads__ad_group_history_tmp"], "unique_id": "model.apple_search_ads_source.stg_apple_search_ads__ad_group_history_tmp", "raw_code": "{{ config(enabled=var('ad_reporting__apple_search_ads_enabled', True)) }}\n\nselect * \nfrom {{ var('ad_group_history') }}", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "tmp/stg_apple_search_ads__ad_group_history_tmp.sql", "original_file_path": "models/tmp/stg_apple_search_ads__ad_group_history_tmp.sql", "name": "stg_apple_search_ads__ad_group_history_tmp", "alias": "stg_apple_search_ads__ad_group_history_tmp", "checksum": {"name": "sha256", "checksum": "69317b26b7a3c109c0e5e61d7fdad053cb0549479a0dfdacd0d67ff0757cc97e"}, "tags": [], "refs": [], "sources": [["apple_search_ads", "ad_group_history"]], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/tmp/stg_apple_search_ads__ad_group_history_tmp.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "apple_search_ads_source", "materialized": "view", "enabled": true}, "created_at": 1666728757.9298391, "compiled_code": "\n\nselect * \nfrom `dbt-package-testing`.`apple_search_ads_integration_tests`.`ad_group_history_data`", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__ad_group_history_tmp`"}, "model.apple_search_ads_source.stg_apple_search_ads__ad_group_report_tmp": {"compiled": true, "resource_type": "model", "depends_on": {"macros": [], "nodes": ["source.apple_search_ads_source.apple_search_ads.ad_group_report"]}, "config": {"enabled": true, "alias": null, "schema": "apple_search_ads_source", "database": null, "tags": [], "meta": {}, "materialized": "view", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "fqn": ["apple_search_ads_source", "tmp", "stg_apple_search_ads__ad_group_report_tmp"], "unique_id": "model.apple_search_ads_source.stg_apple_search_ads__ad_group_report_tmp", "raw_code": "{{ config(enabled=var('ad_reporting__apple_search_ads_enabled', True)) }}\n\nselect * \nfrom {{ var('ad_group_report') }}", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "tmp/stg_apple_search_ads__ad_group_report_tmp.sql", "original_file_path": "models/tmp/stg_apple_search_ads__ad_group_report_tmp.sql", "name": "stg_apple_search_ads__ad_group_report_tmp", "alias": "stg_apple_search_ads__ad_group_report_tmp", "checksum": {"name": "sha256", "checksum": "91089253c95dee7d0aea3f9b8cc49cf343c2d06acf0de36641ebaef03e1d2b1b"}, "tags": [], "refs": [], "sources": [["apple_search_ads", "ad_group_report"]], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/tmp/stg_apple_search_ads__ad_group_report_tmp.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "apple_search_ads_source", "materialized": "view", "enabled": true}, "created_at": 1666728757.9330041, "compiled_code": "\n\nselect * \nfrom `dbt-package-testing`.`apple_search_ads_integration_tests`.`ad_group_report_data`", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__ad_group_report_tmp`"}, "model.apple_search_ads_source.stg_apple_search_ads__ad_history_tmp": {"compiled": true, "resource_type": "model", "depends_on": {"macros": [], "nodes": ["source.apple_search_ads_source.apple_search_ads.ad_history"]}, "config": {"enabled": true, "alias": null, "schema": "apple_search_ads_source", "database": null, "tags": [], "meta": {}, "materialized": "view", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "fqn": ["apple_search_ads_source", "tmp", "stg_apple_search_ads__ad_history_tmp"], "unique_id": "model.apple_search_ads_source.stg_apple_search_ads__ad_history_tmp", "raw_code": "{{ config(enabled=var('ad_reporting__apple_search_ads_enabled', True)) }}\n\nselect * \nfrom {{ var('ad_history') }}", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "tmp/stg_apple_search_ads__ad_history_tmp.sql", "original_file_path": "models/tmp/stg_apple_search_ads__ad_history_tmp.sql", "name": "stg_apple_search_ads__ad_history_tmp", "alias": "stg_apple_search_ads__ad_history_tmp", "checksum": {"name": "sha256", "checksum": "7b184af2299b7d42defa4606467cf9bf379e10cec768bf1e5825c040dbdfacb8"}, "tags": [], "refs": [], "sources": [["apple_search_ads", "ad_history"]], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/tmp/stg_apple_search_ads__ad_history_tmp.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "apple_search_ads_source", "materialized": "view", "enabled": true}, "created_at": 1666728757.9373372, "compiled_code": "\n\nselect * \nfrom `dbt-package-testing`.`apple_search_ads_integration_tests`.`ad_history_data`", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__ad_history_tmp`"}, "model.apple_search_ads_source.stg_apple_search_ads__campaign_report_tmp": {"compiled": true, "resource_type": "model", "depends_on": {"macros": [], "nodes": ["source.apple_search_ads_source.apple_search_ads.campaign_report"]}, "config": {"enabled": true, "alias": null, "schema": "apple_search_ads_source", "database": null, "tags": [], "meta": {}, "materialized": "view", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "fqn": ["apple_search_ads_source", "tmp", "stg_apple_search_ads__campaign_report_tmp"], "unique_id": "model.apple_search_ads_source.stg_apple_search_ads__campaign_report_tmp", "raw_code": "{{ config(enabled=var('ad_reporting__apple_search_ads_enabled', True)) }}\n\nselect * \nfrom {{ var('campaign_report') }}", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "tmp/stg_apple_search_ads__campaign_report_tmp.sql", "original_file_path": "models/tmp/stg_apple_search_ads__campaign_report_tmp.sql", "name": "stg_apple_search_ads__campaign_report_tmp", "alias": "stg_apple_search_ads__campaign_report_tmp", "checksum": {"name": "sha256", "checksum": "ae8d95be0097305356d0ba251d324d35bbe367edcf342c958f69fea9f89625f2"}, "tags": [], "refs": [], "sources": [["apple_search_ads", "campaign_report"]], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/tmp/stg_apple_search_ads__campaign_report_tmp.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "apple_search_ads_source", "materialized": "view", "enabled": true}, "created_at": 1666728757.9407349, "compiled_code": "\n\nselect * \nfrom `dbt-package-testing`.`apple_search_ads_integration_tests`.`campaign_report_data`", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__campaign_report_tmp`"}, "model.apple_search_ads_source.stg_apple_search_ads__organization_tmp": {"compiled": true, "resource_type": "model", "depends_on": {"macros": [], "nodes": ["source.apple_search_ads_source.apple_search_ads.organization"]}, "config": {"enabled": true, "alias": null, "schema": "apple_search_ads_source", "database": null, "tags": [], "meta": {}, "materialized": "view", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "fqn": ["apple_search_ads_source", "tmp", "stg_apple_search_ads__organization_tmp"], "unique_id": "model.apple_search_ads_source.stg_apple_search_ads__organization_tmp", "raw_code": "{{ config(enabled=var('ad_reporting__apple_search_ads_enabled', True)) }}\n\nselect * \nfrom {{ var('organization') }}", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "tmp/stg_apple_search_ads__organization_tmp.sql", "original_file_path": "models/tmp/stg_apple_search_ads__organization_tmp.sql", "name": "stg_apple_search_ads__organization_tmp", "alias": "stg_apple_search_ads__organization_tmp", "checksum": {"name": "sha256", "checksum": "4a62af784e819ec6034aa89fe16019f027c9994b192426e70bcf18bda3d117a9"}, "tags": [], "refs": [], "sources": [["apple_search_ads", "organization"]], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/tmp/stg_apple_search_ads__organization_tmp.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "apple_search_ads_source", "materialized": "view", "enabled": true}, "created_at": 1666728757.94374, "compiled_code": "\n\nselect * \nfrom `dbt-package-testing`.`apple_search_ads_integration_tests`.`organization_data`", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__organization_tmp`"}, "model.apple_search_ads_source.stg_apple_search_ads__keyword_report_tmp": {"compiled": true, "resource_type": "model", "depends_on": {"macros": [], "nodes": ["source.apple_search_ads_source.apple_search_ads.keyword_report"]}, "config": {"enabled": true, "alias": null, "schema": "apple_search_ads_source", "database": null, "tags": [], "meta": {}, "materialized": "view", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "fqn": ["apple_search_ads_source", "tmp", "stg_apple_search_ads__keyword_report_tmp"], "unique_id": "model.apple_search_ads_source.stg_apple_search_ads__keyword_report_tmp", "raw_code": "{{ config(enabled=var('ad_reporting__apple_search_ads_enabled', True)) }}\n\nselect * \nfrom {{ var('keyword_report') }}", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "tmp/stg_apple_search_ads__keyword_report_tmp.sql", "original_file_path": "models/tmp/stg_apple_search_ads__keyword_report_tmp.sql", "name": "stg_apple_search_ads__keyword_report_tmp", "alias": "stg_apple_search_ads__keyword_report_tmp", "checksum": {"name": "sha256", "checksum": "5009b770850f4f2648d5498a78b1491e6a44250d9ac2d7c08c249e8624f517f2"}, "tags": [], "refs": [], "sources": [["apple_search_ads", "keyword_report"]], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/tmp/stg_apple_search_ads__keyword_report_tmp.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "apple_search_ads_source", "materialized": "view", "enabled": true}, "created_at": 1666728757.946652, "compiled_code": "\n\nselect * \nfrom `dbt-package-testing`.`apple_search_ads_integration_tests`.`keyword_report_data`", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__keyword_report_tmp`"}, "model.apple_search_ads_source.stg_apple_search_ads__ad_report_tmp": {"compiled": true, "resource_type": "model", "depends_on": {"macros": [], "nodes": ["source.apple_search_ads_source.apple_search_ads.ad_level_report"]}, "config": {"enabled": true, "alias": null, "schema": "apple_search_ads_source", "database": null, "tags": [], "meta": {}, "materialized": "view", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "post-hook": [], "pre-hook": []}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "fqn": ["apple_search_ads_source", "tmp", "stg_apple_search_ads__ad_report_tmp"], "unique_id": "model.apple_search_ads_source.stg_apple_search_ads__ad_report_tmp", "raw_code": "{{ config(enabled=var('ad_reporting__apple_search_ads_enabled', True)) }}\n\nselect * \nfrom {{ var('ad_report') }}", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "tmp/stg_apple_search_ads__ad_report_tmp.sql", "original_file_path": "models/tmp/stg_apple_search_ads__ad_report_tmp.sql", "name": "stg_apple_search_ads__ad_report_tmp", "alias": "stg_apple_search_ads__ad_report_tmp", "checksum": {"name": "sha256", "checksum": "1744a47e20045a53726079456f5aba358e0292dd8a14d670e6ab7b2c30ece7ee"}, "tags": [], "refs": [], "sources": [["apple_search_ads", "ad_level_report"]], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/tmp/stg_apple_search_ads__ad_report_tmp.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "apple_search_ads_source", "materialized": "view", "enabled": true}, "created_at": 1666728757.950112, "compiled_code": "\n\nselect * \nfrom `dbt-package-testing`.`apple_search_ads_integration_tests`.`ad_report_data`", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "`dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__ad_report_tmp`"}, "test.apple_search_ads.not_null_apple_search_ads__ad_group_report_ad_group_id.60febec6b5": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "ad_group_id", "model": "{{ get_where_subquery(ref('apple_search_ads__ad_group_report')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads.apple_search_ads__ad_group_report"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads", "not_null_apple_search_ads__ad_group_report_ad_group_id"], "unique_id": "test.apple_search_ads.not_null_apple_search_ads__ad_group_report_ad_group_id.60febec6b5", "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "package_name": "apple_search_ads", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads", "path": "not_null_apple_search_ads__ad_group_report_ad_group_id.sql", "original_file_path": "models/apple_search_ads.yml", "name": "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": ""}, "tags": [], "refs": [["apple_search_ads__ad_group_report"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads/models/apple_search_ads.yml/not_null_apple_search_ads__ad_group_report_ad_group_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1666728758.021518, "compiled_code": "\n \n \n\n\n\nselect ad_group_id\nfrom `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads`.`apple_search_ads__ad_group_report`\nwhere ad_group_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "ad_group_id", "file_key_name": "models.apple_search_ads__ad_group_report"}, "test.apple_search_ads.not_null_apple_search_ads__ad_group_report_date_day.e6ffb30b3c": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('apple_search_ads__ad_group_report')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads.apple_search_ads__ad_group_report"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads", "not_null_apple_search_ads__ad_group_report_date_day"], "unique_id": "test.apple_search_ads.not_null_apple_search_ads__ad_group_report_date_day.e6ffb30b3c", "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "package_name": "apple_search_ads", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads", "path": "not_null_apple_search_ads__ad_group_report_date_day.sql", "original_file_path": "models/apple_search_ads.yml", "name": "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": ""}, "tags": [], "refs": [["apple_search_ads__ad_group_report"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads/models/apple_search_ads.yml/not_null_apple_search_ads__ad_group_report_date_day.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1666728758.022455, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads`.`apple_search_ads__ad_group_report`\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "date_day", "file_key_name": "models.apple_search_ads__ad_group_report"}, "test.apple_search_ads.dbt_utils_unique_combination_of_columns_apple_search_ads__ad_group_report_organization_id__campaign_id__ad_group_id__date_day.19d180bab9": {"test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["organization_id", "campaign_id", "ad_group_id", "date_day"], "model": "{{ get_where_subquery(ref('apple_search_ads__ad_group_report')) }}"}, "namespace": "dbt_utils"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_utils.test_unique_combination_of_columns", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads.apple_search_ads__ad_group_report"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_36b2ef766b4fc10b364ed4744c94afb2", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads", "dbt_utils_unique_combination_of_columns_apple_search_ads__ad_group_report_organization_id__campaign_id__ad_group_id__date_day"], "unique_id": "test.apple_search_ads.dbt_utils_unique_combination_of_columns_apple_search_ads__ad_group_report_organization_id__campaign_id__ad_group_id__date_day.19d180bab9", "raw_code": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_36b2ef766b4fc10b364ed4744c94afb2\") }}", "language": "sql", "package_name": "apple_search_ads", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads", "path": "dbt_utils_unique_combination_o_36b2ef766b4fc10b364ed4744c94afb2.sql", "original_file_path": "models/apple_search_ads.yml", "name": "dbt_utils_unique_combination_of_columns_apple_search_ads__ad_group_report_organization_id__campaign_id__ad_group_id__date_day", "alias": "dbt_utils_unique_combination_o_36b2ef766b4fc10b364ed4744c94afb2", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["apple_search_ads__ad_group_report"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads/models/apple_search_ads.yml/dbt_utils_unique_combination_o_36b2ef766b4fc10b364ed4744c94afb2.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_36b2ef766b4fc10b364ed4744c94afb2"}, "created_at": 1666728758.0232801, "compiled_code": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n organization_id, campaign_id, ad_group_id, date_day\n from `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads`.`apple_search_ads__ad_group_report`\n group by organization_id, campaign_id, ad_group_id, date_day\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": null, "file_key_name": "models.apple_search_ads__ad_group_report"}, "test.apple_search_ads.not_null_apple_search_ads__ad_report_ad_id.0ab2c5075c": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "ad_id", "model": "{{ get_where_subquery(ref('apple_search_ads__ad_report')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads.apple_search_ads__ad_report"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads", "not_null_apple_search_ads__ad_report_ad_id"], "unique_id": "test.apple_search_ads.not_null_apple_search_ads__ad_report_ad_id.0ab2c5075c", "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "package_name": "apple_search_ads", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads", "path": "not_null_apple_search_ads__ad_report_ad_id.sql", "original_file_path": "models/apple_search_ads.yml", "name": "not_null_apple_search_ads__ad_report_ad_id", "alias": "not_null_apple_search_ads__ad_report_ad_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["apple_search_ads__ad_report"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads/models/apple_search_ads.yml/not_null_apple_search_ads__ad_report_ad_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1666728758.029869, "compiled_code": "\n \n \n\n\n\nselect ad_id\nfrom `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads`.`apple_search_ads__ad_report`\nwhere ad_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "ad_id", "file_key_name": "models.apple_search_ads__ad_report"}, "test.apple_search_ads.not_null_apple_search_ads__ad_report_date_day.b86c049e17": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('apple_search_ads__ad_report')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads.apple_search_ads__ad_report"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads", "not_null_apple_search_ads__ad_report_date_day"], "unique_id": "test.apple_search_ads.not_null_apple_search_ads__ad_report_date_day.b86c049e17", "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "package_name": "apple_search_ads", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads", "path": "not_null_apple_search_ads__ad_report_date_day.sql", "original_file_path": "models/apple_search_ads.yml", "name": "not_null_apple_search_ads__ad_report_date_day", "alias": "not_null_apple_search_ads__ad_report_date_day", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["apple_search_ads__ad_report"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads/models/apple_search_ads.yml/not_null_apple_search_ads__ad_report_date_day.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1666728758.030839, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads`.`apple_search_ads__ad_report`\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "date_day", "file_key_name": "models.apple_search_ads__ad_report"}, "test.apple_search_ads.dbt_utils_unique_combination_of_columns_apple_search_ads__ad_report_organization_id__campaign_id__ad_group_id__ad_id__date_day.54e27817a1": {"test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["organization_id", "campaign_id", "ad_group_id", "ad_id", "date_day"], "model": "{{ get_where_subquery(ref('apple_search_ads__ad_report')) }}"}, "namespace": "dbt_utils"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_utils.test_unique_combination_of_columns", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads.apple_search_ads__ad_report"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_bd72aacf9db10be434541a5eb54a963c", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads", "dbt_utils_unique_combination_of_columns_apple_search_ads__ad_report_organization_id__campaign_id__ad_group_id__ad_id__date_day"], "unique_id": "test.apple_search_ads.dbt_utils_unique_combination_of_columns_apple_search_ads__ad_report_organization_id__campaign_id__ad_group_id__ad_id__date_day.54e27817a1", "raw_code": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_bd72aacf9db10be434541a5eb54a963c\") }}", "language": "sql", "package_name": "apple_search_ads", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads", "path": "dbt_utils_unique_combination_o_bd72aacf9db10be434541a5eb54a963c.sql", "original_file_path": "models/apple_search_ads.yml", "name": "dbt_utils_unique_combination_of_columns_apple_search_ads__ad_report_organization_id__campaign_id__ad_group_id__ad_id__date_day", "alias": "dbt_utils_unique_combination_o_bd72aacf9db10be434541a5eb54a963c", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["apple_search_ads__ad_report"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads/models/apple_search_ads.yml/dbt_utils_unique_combination_o_bd72aacf9db10be434541a5eb54a963c.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_bd72aacf9db10be434541a5eb54a963c"}, "created_at": 1666728758.031717, "compiled_code": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n organization_id, campaign_id, ad_group_id, ad_id, date_day\n from `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads`.`apple_search_ads__ad_report`\n group by organization_id, campaign_id, ad_group_id, ad_id, date_day\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": null, "file_key_name": "models.apple_search_ads__ad_report"}, "test.apple_search_ads.not_null_apple_search_ads__campaign_report_campaign_id.e26ed1e146": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "campaign_id", "model": "{{ get_where_subquery(ref('apple_search_ads__campaign_report')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads.apple_search_ads__campaign_report"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads", "not_null_apple_search_ads__campaign_report_campaign_id"], "unique_id": "test.apple_search_ads.not_null_apple_search_ads__campaign_report_campaign_id.e26ed1e146", "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "package_name": "apple_search_ads", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads", "path": "not_null_apple_search_ads__campaign_report_campaign_id.sql", "original_file_path": "models/apple_search_ads.yml", "name": "not_null_apple_search_ads__campaign_report_campaign_id", "alias": "not_null_apple_search_ads__campaign_report_campaign_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["apple_search_ads__campaign_report"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads/models/apple_search_ads.yml/not_null_apple_search_ads__campaign_report_campaign_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1666728758.034633, "compiled_code": "\n \n \n\n\n\nselect campaign_id\nfrom `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads`.`apple_search_ads__campaign_report`\nwhere campaign_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "campaign_id", "file_key_name": "models.apple_search_ads__campaign_report"}, "test.apple_search_ads.not_null_apple_search_ads__campaign_report_date_day.35652b8d1a": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('apple_search_ads__campaign_report')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads.apple_search_ads__campaign_report"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads", "not_null_apple_search_ads__campaign_report_date_day"], "unique_id": "test.apple_search_ads.not_null_apple_search_ads__campaign_report_date_day.35652b8d1a", "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "package_name": "apple_search_ads", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads", "path": "not_null_apple_search_ads__campaign_report_date_day.sql", "original_file_path": "models/apple_search_ads.yml", "name": "not_null_apple_search_ads__campaign_report_date_day", "alias": "not_null_apple_search_ads__campaign_report_date_day", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["apple_search_ads__campaign_report"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads/models/apple_search_ads.yml/not_null_apple_search_ads__campaign_report_date_day.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1666728758.035486, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads`.`apple_search_ads__campaign_report`\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "date_day", "file_key_name": "models.apple_search_ads__campaign_report"}, "test.apple_search_ads.dbt_utils_unique_combination_of_columns_apple_search_ads__campaign_report_organization_id__campaign_id__date_day.647e56213f": {"test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["organization_id", "campaign_id", "date_day"], "model": "{{ get_where_subquery(ref('apple_search_ads__campaign_report')) }}"}, "namespace": "dbt_utils"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_utils.test_unique_combination_of_columns", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads.apple_search_ads__campaign_report"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_3acbf89c4e0b6809bc53bfa9067d89c5", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads", "dbt_utils_unique_combination_of_columns_apple_search_ads__campaign_report_organization_id__campaign_id__date_day"], "unique_id": "test.apple_search_ads.dbt_utils_unique_combination_of_columns_apple_search_ads__campaign_report_organization_id__campaign_id__date_day.647e56213f", "raw_code": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_3acbf89c4e0b6809bc53bfa9067d89c5\") }}", "language": "sql", "package_name": "apple_search_ads", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads", "path": "dbt_utils_unique_combination_o_3acbf89c4e0b6809bc53bfa9067d89c5.sql", "original_file_path": "models/apple_search_ads.yml", "name": "dbt_utils_unique_combination_of_columns_apple_search_ads__campaign_report_organization_id__campaign_id__date_day", "alias": "dbt_utils_unique_combination_o_3acbf89c4e0b6809bc53bfa9067d89c5", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["apple_search_ads__campaign_report"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads/models/apple_search_ads.yml/dbt_utils_unique_combination_o_3acbf89c4e0b6809bc53bfa9067d89c5.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_3acbf89c4e0b6809bc53bfa9067d89c5"}, "created_at": 1666728758.036337, "compiled_code": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n organization_id, campaign_id, date_day\n from `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads`.`apple_search_ads__campaign_report`\n group by organization_id, campaign_id, date_day\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": null, "file_key_name": "models.apple_search_ads__campaign_report"}, "test.apple_search_ads.not_null_apple_search_ads__keyword_report_keyword_id.ea493710db": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "keyword_id", "model": "{{ get_where_subquery(ref('apple_search_ads__keyword_report')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads.apple_search_ads__keyword_report"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads", "not_null_apple_search_ads__keyword_report_keyword_id"], "unique_id": "test.apple_search_ads.not_null_apple_search_ads__keyword_report_keyword_id.ea493710db", "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "package_name": "apple_search_ads", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads", "path": "not_null_apple_search_ads__keyword_report_keyword_id.sql", "original_file_path": "models/apple_search_ads.yml", "name": "not_null_apple_search_ads__keyword_report_keyword_id", "alias": "not_null_apple_search_ads__keyword_report_keyword_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["apple_search_ads__keyword_report"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads/models/apple_search_ads.yml/not_null_apple_search_ads__keyword_report_keyword_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1666728758.03901, "compiled_code": "\n \n \n\n\n\nselect keyword_id\nfrom `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads`.`apple_search_ads__keyword_report`\nwhere keyword_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "keyword_id", "file_key_name": "models.apple_search_ads__keyword_report"}, "test.apple_search_ads.not_null_apple_search_ads__keyword_report_date_day.3dec8d0e82": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('apple_search_ads__keyword_report')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads.apple_search_ads__keyword_report"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads", "not_null_apple_search_ads__keyword_report_date_day"], "unique_id": "test.apple_search_ads.not_null_apple_search_ads__keyword_report_date_day.3dec8d0e82", "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "package_name": "apple_search_ads", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads", "path": "not_null_apple_search_ads__keyword_report_date_day.sql", "original_file_path": "models/apple_search_ads.yml", "name": "not_null_apple_search_ads__keyword_report_date_day", "alias": "not_null_apple_search_ads__keyword_report_date_day", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["apple_search_ads__keyword_report"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads/models/apple_search_ads.yml/not_null_apple_search_ads__keyword_report_date_day.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1666728758.040002, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads`.`apple_search_ads__keyword_report`\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "date_day", "file_key_name": "models.apple_search_ads__keyword_report"}, "test.apple_search_ads.dbt_utils_unique_combination_of_columns_apple_search_ads__keyword_report_organization_id__campaign_id__ad_group_id__keyword_id__date_day.78fb033a13": {"test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["organization_id", "campaign_id", "ad_group_id", "keyword_id", "date_day"], "model": "{{ get_where_subquery(ref('apple_search_ads__keyword_report')) }}"}, "namespace": "dbt_utils"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_utils.test_unique_combination_of_columns", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads.apple_search_ads__keyword_report"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_533c8551a101baa56c397525cb8a9246", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads", "dbt_utils_unique_combination_of_columns_apple_search_ads__keyword_report_organization_id__campaign_id__ad_group_id__keyword_id__date_day"], "unique_id": "test.apple_search_ads.dbt_utils_unique_combination_of_columns_apple_search_ads__keyword_report_organization_id__campaign_id__ad_group_id__keyword_id__date_day.78fb033a13", "raw_code": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_533c8551a101baa56c397525cb8a9246\") }}", "language": "sql", "package_name": "apple_search_ads", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads", "path": "dbt_utils_unique_combination_o_533c8551a101baa56c397525cb8a9246.sql", "original_file_path": "models/apple_search_ads.yml", "name": "dbt_utils_unique_combination_of_columns_apple_search_ads__keyword_report_organization_id__campaign_id__ad_group_id__keyword_id__date_day", "alias": "dbt_utils_unique_combination_o_533c8551a101baa56c397525cb8a9246", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["apple_search_ads__keyword_report"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads/models/apple_search_ads.yml/dbt_utils_unique_combination_o_533c8551a101baa56c397525cb8a9246.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_533c8551a101baa56c397525cb8a9246"}, "created_at": 1666728758.040858, "compiled_code": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n organization_id, campaign_id, ad_group_id, keyword_id, date_day\n from `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads`.`apple_search_ads__keyword_report`\n group by organization_id, campaign_id, ad_group_id, keyword_id, date_day\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": null, "file_key_name": "models.apple_search_ads__keyword_report"}, "test.apple_search_ads.not_null_apple_search_ads__organization_report_organization_id.b6cf7d69f8": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "organization_id", "model": "{{ get_where_subquery(ref('apple_search_ads__organization_report')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads.apple_search_ads__organization_report"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads", "not_null_apple_search_ads__organization_report_organization_id"], "unique_id": "test.apple_search_ads.not_null_apple_search_ads__organization_report_organization_id.b6cf7d69f8", "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "package_name": "apple_search_ads", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads", "path": "not_null_apple_search_ads__organization_report_organization_id.sql", "original_file_path": "models/apple_search_ads.yml", "name": "not_null_apple_search_ads__organization_report_organization_id", "alias": "not_null_apple_search_ads__organization_report_organization_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["apple_search_ads__organization_report"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads/models/apple_search_ads.yml/not_null_apple_search_ads__organization_report_organization_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1666728758.043932, "compiled_code": "\n \n \n\n\n\nselect organization_id\nfrom `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads`.`apple_search_ads__organization_report`\nwhere organization_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "organization_id", "file_key_name": "models.apple_search_ads__organization_report"}, "test.apple_search_ads.not_null_apple_search_ads__organization_report_date_day.5784fed523": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('apple_search_ads__organization_report')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads.apple_search_ads__organization_report"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads", "not_null_apple_search_ads__organization_report_date_day"], "unique_id": "test.apple_search_ads.not_null_apple_search_ads__organization_report_date_day.5784fed523", "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "package_name": "apple_search_ads", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads", "path": "not_null_apple_search_ads__organization_report_date_day.sql", "original_file_path": "models/apple_search_ads.yml", "name": "not_null_apple_search_ads__organization_report_date_day", "alias": "not_null_apple_search_ads__organization_report_date_day", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["apple_search_ads__organization_report"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads/models/apple_search_ads.yml/not_null_apple_search_ads__organization_report_date_day.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1666728758.044807, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads`.`apple_search_ads__organization_report`\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "date_day", "file_key_name": "models.apple_search_ads__organization_report"}, "test.apple_search_ads.dbt_utils_unique_combination_of_columns_apple_search_ads__organization_report_organization_id__date_day.8bc84fccc3": {"test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["organization_id", "date_day"], "model": "{{ get_where_subquery(ref('apple_search_ads__organization_report')) }}"}, "namespace": "dbt_utils"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_utils.test_unique_combination_of_columns", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads.apple_search_ads__organization_report"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_f2f453668a8bb7c0387ed85fc7bfaf2d", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads", "dbt_utils_unique_combination_of_columns_apple_search_ads__organization_report_organization_id__date_day"], "unique_id": "test.apple_search_ads.dbt_utils_unique_combination_of_columns_apple_search_ads__organization_report_organization_id__date_day.8bc84fccc3", "raw_code": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_f2f453668a8bb7c0387ed85fc7bfaf2d\") }}", "language": "sql", "package_name": "apple_search_ads", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads", "path": "dbt_utils_unique_combination_o_f2f453668a8bb7c0387ed85fc7bfaf2d.sql", "original_file_path": "models/apple_search_ads.yml", "name": "dbt_utils_unique_combination_of_columns_apple_search_ads__organization_report_organization_id__date_day", "alias": "dbt_utils_unique_combination_o_f2f453668a8bb7c0387ed85fc7bfaf2d", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["apple_search_ads__organization_report"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads/models/apple_search_ads.yml/dbt_utils_unique_combination_o_f2f453668a8bb7c0387ed85fc7bfaf2d.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_f2f453668a8bb7c0387ed85fc7bfaf2d"}, "created_at": 1666728758.045656, "compiled_code": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n organization_id, date_day\n from `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads`.`apple_search_ads__organization_report`\n group by organization_id, date_day\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": null, "file_key_name": "models.apple_search_ads__organization_report"}, "test.apple_search_ads.not_null_apple_search_ads__search_term_report_date_day.1bc3b0d57c": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('apple_search_ads__search_term_report')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads.apple_search_ads__search_term_report"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads", "not_null_apple_search_ads__search_term_report_date_day"], "unique_id": "test.apple_search_ads.not_null_apple_search_ads__search_term_report_date_day.1bc3b0d57c", "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "package_name": "apple_search_ads", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads", "path": "not_null_apple_search_ads__search_term_report_date_day.sql", "original_file_path": "models/apple_search_ads.yml", "name": "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": ""}, "tags": [], "refs": [["apple_search_ads__search_term_report"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads/models/apple_search_ads.yml/not_null_apple_search_ads__search_term_report_date_day.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1666728758.048388, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads`.`apple_search_ads__search_term_report`\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "date_day", "file_key_name": "models.apple_search_ads__search_term_report"}, "test.apple_search_ads.not_null_apple_search_ads__search_term_report_search_term_text.aecc7447f7": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "search_term_text", "model": "{{ get_where_subquery(ref('apple_search_ads__search_term_report')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads.apple_search_ads__search_term_report"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads", "not_null_apple_search_ads__search_term_report_search_term_text"], "unique_id": "test.apple_search_ads.not_null_apple_search_ads__search_term_report_search_term_text.aecc7447f7", "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "package_name": "apple_search_ads", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads", "path": "not_null_apple_search_ads__search_term_report_search_term_text.sql", "original_file_path": "models/apple_search_ads.yml", "name": "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": ""}, "tags": [], "refs": [["apple_search_ads__search_term_report"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads/models/apple_search_ads.yml/not_null_apple_search_ads__search_term_report_search_term_text.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1666728758.049206, "compiled_code": "\n \n \n\n\n\nselect search_term_text\nfrom `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads`.`apple_search_ads__search_term_report`\nwhere search_term_text is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "search_term_text", "file_key_name": "models.apple_search_ads__search_term_report"}, "test.apple_search_ads.dbt_utils_unique_combination_of_columns_apple_search_ads__search_term_report_search_term_text__date_day.e60fe79ec4": {"test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["search_term_text", "date_day"], "model": "{{ get_where_subquery(ref('apple_search_ads__search_term_report')) }}"}, "namespace": "dbt_utils"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_utils.test_unique_combination_of_columns", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads.apple_search_ads__search_term_report"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_7c3690db5ce751fbf1f2dff07b3a8690", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads", "dbt_utils_unique_combination_of_columns_apple_search_ads__search_term_report_search_term_text__date_day"], "unique_id": "test.apple_search_ads.dbt_utils_unique_combination_of_columns_apple_search_ads__search_term_report_search_term_text__date_day.e60fe79ec4", "raw_code": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_7c3690db5ce751fbf1f2dff07b3a8690\") }}", "language": "sql", "package_name": "apple_search_ads", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads", "path": "dbt_utils_unique_combination_o_7c3690db5ce751fbf1f2dff07b3a8690.sql", "original_file_path": "models/apple_search_ads.yml", "name": "dbt_utils_unique_combination_of_columns_apple_search_ads__search_term_report_search_term_text__date_day", "alias": "dbt_utils_unique_combination_o_7c3690db5ce751fbf1f2dff07b3a8690", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["apple_search_ads__search_term_report"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads/models/apple_search_ads.yml/dbt_utils_unique_combination_o_7c3690db5ce751fbf1f2dff07b3a8690.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_7c3690db5ce751fbf1f2dff07b3a8690"}, "created_at": 1666728758.050177, "compiled_code": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n search_term_text, date_day\n from `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads`.`apple_search_ads__search_term_report`\n group by search_term_text, date_day\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": null, "file_key_name": "models.apple_search_ads__search_term_report"}, "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_group_history_modified_at.e5d65fa28f": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "modified_at", "model": "{{ get_where_subquery(ref('stg_apple_search_ads__ad_group_history')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__ad_group_history"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads_source", "not_null_stg_apple_search_ads__ad_group_history_modified_at"], "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_group_history_modified_at.e5d65fa28f", "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "not_null_stg_apple_search_ads__ad_group_history_modified_at.sql", "original_file_path": "models/stg_apple_search_ads.yml", "name": "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": ""}, "tags": [], "refs": [["stg_apple_search_ads__ad_group_history"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads.yml/not_null_stg_apple_search_ads__ad_group_history_modified_at.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1666728758.090146, "compiled_code": "\n \n \n\n\n\nselect modified_at\nfrom `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__ad_group_history`\nwhere modified_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "modified_at", "file_key_name": "models.stg_apple_search_ads__ad_group_history"}, "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_group_history_ad_group_id.dc128eecb7": {"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}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__ad_group_history"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads_source", "not_null_stg_apple_search_ads__ad_group_history_ad_group_id"], "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_group_history_ad_group_id.dc128eecb7", "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "not_null_stg_apple_search_ads__ad_group_history_ad_group_id.sql", "original_file_path": "models/stg_apple_search_ads.yml", "name": "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": ""}, "tags": [], "refs": [["stg_apple_search_ads__ad_group_history"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads.yml/not_null_stg_apple_search_ads__ad_group_history_ad_group_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1666728758.091109, "compiled_code": "\n \n \n\n\n\nselect ad_group_id\nfrom `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__ad_group_history`\nwhere ad_group_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "ad_group_id", "file_key_name": "models.stg_apple_search_ads__ad_group_history"}, "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__ad_group_history_ad_group_id__modified_at.84af14c83b": {"test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["ad_group_id", "modified_at"], "model": "{{ get_where_subquery(ref('stg_apple_search_ads__ad_group_history')) }}"}, "namespace": "dbt_utils"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_utils.test_unique_combination_of_columns", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__ad_group_history"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_d82553a0f3b4daa8d59460c85a542d4f", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads_source", "dbt_utils_unique_combination_of_columns_stg_apple_search_ads__ad_group_history_ad_group_id__modified_at"], "unique_id": "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__ad_group_history_ad_group_id__modified_at.84af14c83b", "raw_code": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_d82553a0f3b4daa8d59460c85a542d4f\") }}", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "dbt_utils_unique_combination_o_d82553a0f3b4daa8d59460c85a542d4f.sql", "original_file_path": "models/stg_apple_search_ads.yml", "name": "dbt_utils_unique_combination_of_columns_stg_apple_search_ads__ad_group_history_ad_group_id__modified_at", "alias": "dbt_utils_unique_combination_o_d82553a0f3b4daa8d59460c85a542d4f", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_apple_search_ads__ad_group_history"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads.yml/dbt_utils_unique_combination_o_d82553a0f3b4daa8d59460c85a542d4f.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_d82553a0f3b4daa8d59460c85a542d4f"}, "created_at": 1666728758.091937, "compiled_code": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n ad_group_id, modified_at\n from `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__ad_group_history`\n group by ad_group_id, modified_at\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": null, "file_key_name": "models.stg_apple_search_ads__ad_group_history"}, "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_group_report_ad_group_id.a115f9cfc1": {"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}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__ad_group_report"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads_source", "not_null_stg_apple_search_ads__ad_group_report_ad_group_id"], "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_group_report_ad_group_id.a115f9cfc1", "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "not_null_stg_apple_search_ads__ad_group_report_ad_group_id.sql", "original_file_path": "models/stg_apple_search_ads.yml", "name": "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": ""}, "tags": [], "refs": [["stg_apple_search_ads__ad_group_report"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads.yml/not_null_stg_apple_search_ads__ad_group_report_ad_group_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1666728758.094362, "compiled_code": "\n \n \n\n\n\nselect ad_group_id\nfrom `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__ad_group_report`\nwhere ad_group_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "ad_group_id", "file_key_name": "models.stg_apple_search_ads__ad_group_report"}, "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_group_report_date_day.4dfd46a43b": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('stg_apple_search_ads__ad_group_report')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__ad_group_report"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads_source", "not_null_stg_apple_search_ads__ad_group_report_date_day"], "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_group_report_date_day.4dfd46a43b", "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "not_null_stg_apple_search_ads__ad_group_report_date_day.sql", "original_file_path": "models/stg_apple_search_ads.yml", "name": "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": ""}, "tags": [], "refs": [["stg_apple_search_ads__ad_group_report"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads.yml/not_null_stg_apple_search_ads__ad_group_report_date_day.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1666728758.095181, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__ad_group_report`\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "date_day", "file_key_name": "models.stg_apple_search_ads__ad_group_report"}, "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__ad_group_report_ad_group_id__date_day.a0fcc4e33c": {"test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["ad_group_id", "date_day"], "model": "{{ get_where_subquery(ref('stg_apple_search_ads__ad_group_report')) }}"}, "namespace": "dbt_utils"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_utils.test_unique_combination_of_columns", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__ad_group_report"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_107a9492c163887581fde6b34131e42d", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads_source", "dbt_utils_unique_combination_of_columns_stg_apple_search_ads__ad_group_report_ad_group_id__date_day"], "unique_id": "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__ad_group_report_ad_group_id__date_day.a0fcc4e33c", "raw_code": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_107a9492c163887581fde6b34131e42d\") }}", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "dbt_utils_unique_combination_o_107a9492c163887581fde6b34131e42d.sql", "original_file_path": "models/stg_apple_search_ads.yml", "name": "dbt_utils_unique_combination_of_columns_stg_apple_search_ads__ad_group_report_ad_group_id__date_day", "alias": "dbt_utils_unique_combination_o_107a9492c163887581fde6b34131e42d", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_apple_search_ads__ad_group_report"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads.yml/dbt_utils_unique_combination_o_107a9492c163887581fde6b34131e42d.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_107a9492c163887581fde6b34131e42d"}, "created_at": 1666728758.095996, "compiled_code": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n ad_group_id, date_day\n from `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__ad_group_report`\n group by ad_group_id, date_day\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": null, "file_key_name": "models.stg_apple_search_ads__ad_group_report"}, "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_history_modified_at.2eea7e006d": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "modified_at", "model": "{{ get_where_subquery(ref('stg_apple_search_ads__ad_history')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__ad_history"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads_source", "not_null_stg_apple_search_ads__ad_history_modified_at"], "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_history_modified_at.2eea7e006d", "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "not_null_stg_apple_search_ads__ad_history_modified_at.sql", "original_file_path": "models/stg_apple_search_ads.yml", "name": "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": ""}, "tags": [], "refs": [["stg_apple_search_ads__ad_history"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads.yml/not_null_stg_apple_search_ads__ad_history_modified_at.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1666728758.098546, "compiled_code": "\n \n \n\n\n\nselect modified_at\nfrom `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__ad_history`\nwhere modified_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "modified_at", "file_key_name": "models.stg_apple_search_ads__ad_history"}, "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_history_ad_id.4ad3bde32a": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "ad_id", "model": "{{ get_where_subquery(ref('stg_apple_search_ads__ad_history')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__ad_history"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads_source", "not_null_stg_apple_search_ads__ad_history_ad_id"], "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_history_ad_id.4ad3bde32a", "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "not_null_stg_apple_search_ads__ad_history_ad_id.sql", "original_file_path": "models/stg_apple_search_ads.yml", "name": "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": ""}, "tags": [], "refs": [["stg_apple_search_ads__ad_history"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads.yml/not_null_stg_apple_search_ads__ad_history_ad_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1666728758.099348, "compiled_code": "\n \n \n\n\n\nselect ad_id\nfrom `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__ad_history`\nwhere ad_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "ad_id", "file_key_name": "models.stg_apple_search_ads__ad_history"}, "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__ad_history_ad_id__modified_at.38599b8cba": {"test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["ad_id", "modified_at"], "model": "{{ get_where_subquery(ref('stg_apple_search_ads__ad_history')) }}"}, "namespace": "dbt_utils"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_utils.test_unique_combination_of_columns", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__ad_history"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_ed0f61b146739c836defcf2fb6005d31", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads_source", "dbt_utils_unique_combination_of_columns_stg_apple_search_ads__ad_history_ad_id__modified_at"], "unique_id": "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__ad_history_ad_id__modified_at.38599b8cba", "raw_code": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_ed0f61b146739c836defcf2fb6005d31\") }}", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "dbt_utils_unique_combination_o_ed0f61b146739c836defcf2fb6005d31.sql", "original_file_path": "models/stg_apple_search_ads.yml", "name": "dbt_utils_unique_combination_of_columns_stg_apple_search_ads__ad_history_ad_id__modified_at", "alias": "dbt_utils_unique_combination_o_ed0f61b146739c836defcf2fb6005d31", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_apple_search_ads__ad_history"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads.yml/dbt_utils_unique_combination_o_ed0f61b146739c836defcf2fb6005d31.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_ed0f61b146739c836defcf2fb6005d31"}, "created_at": 1666728758.100281, "compiled_code": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n ad_id, modified_at\n from `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__ad_history`\n group by ad_id, modified_at\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": null, "file_key_name": "models.stg_apple_search_ads__ad_history"}, "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_report_date_day.e6252346d8": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('stg_apple_search_ads__ad_report')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__ad_report"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads_source", "not_null_stg_apple_search_ads__ad_report_date_day"], "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_report_date_day.e6252346d8", "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "not_null_stg_apple_search_ads__ad_report_date_day.sql", "original_file_path": "models/stg_apple_search_ads.yml", "name": "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": ""}, "tags": [], "refs": [["stg_apple_search_ads__ad_report"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads.yml/not_null_stg_apple_search_ads__ad_report_date_day.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1666728758.102623, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__ad_report`\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "date_day", "file_key_name": "models.stg_apple_search_ads__ad_report"}, "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_report_ad_group_id.a397755e9f": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "ad_group_id", "model": "{{ get_where_subquery(ref('stg_apple_search_ads__ad_report')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__ad_report"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads_source", "not_null_stg_apple_search_ads__ad_report_ad_group_id"], "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_report_ad_group_id.a397755e9f", "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "not_null_stg_apple_search_ads__ad_report_ad_group_id.sql", "original_file_path": "models/stg_apple_search_ads.yml", "name": "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": ""}, "tags": [], "refs": [["stg_apple_search_ads__ad_report"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads.yml/not_null_stg_apple_search_ads__ad_report_ad_group_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1666728758.1034381, "compiled_code": "\n \n \n\n\n\nselect ad_group_id\nfrom `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__ad_report`\nwhere ad_group_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "ad_group_id", "file_key_name": "models.stg_apple_search_ads__ad_report"}, "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_report_ad_id.d08e760c58": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "ad_id", "model": "{{ get_where_subquery(ref('stg_apple_search_ads__ad_report')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__ad_report"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads_source", "not_null_stg_apple_search_ads__ad_report_ad_id"], "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_report_ad_id.d08e760c58", "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "not_null_stg_apple_search_ads__ad_report_ad_id.sql", "original_file_path": "models/stg_apple_search_ads.yml", "name": "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": ""}, "tags": [], "refs": [["stg_apple_search_ads__ad_report"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads.yml/not_null_stg_apple_search_ads__ad_report_ad_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1666728758.1042402, "compiled_code": "\n \n \n\n\n\nselect ad_id\nfrom `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__ad_report`\nwhere ad_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "ad_id", "file_key_name": "models.stg_apple_search_ads__ad_report"}, "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__ad_report_ad_id__date_day__ad_group_id.0d8d23c516": {"test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["ad_id", "date_day", "ad_group_id"], "model": "{{ get_where_subquery(ref('stg_apple_search_ads__ad_report')) }}"}, "namespace": "dbt_utils"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_utils.test_unique_combination_of_columns", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__ad_report"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_9ce5e828ce9fa0987b5e86cbcb1207b9", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads_source", "dbt_utils_unique_combination_of_columns_stg_apple_search_ads__ad_report_ad_id__date_day__ad_group_id"], "unique_id": "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__ad_report_ad_id__date_day__ad_group_id.0d8d23c516", "raw_code": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_9ce5e828ce9fa0987b5e86cbcb1207b9\") }}", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "dbt_utils_unique_combination_o_9ce5e828ce9fa0987b5e86cbcb1207b9.sql", "original_file_path": "models/stg_apple_search_ads.yml", "name": "dbt_utils_unique_combination_of_columns_stg_apple_search_ads__ad_report_ad_id__date_day__ad_group_id", "alias": "dbt_utils_unique_combination_o_9ce5e828ce9fa0987b5e86cbcb1207b9", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_apple_search_ads__ad_report"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads.yml/dbt_utils_unique_combination_o_9ce5e828ce9fa0987b5e86cbcb1207b9.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_9ce5e828ce9fa0987b5e86cbcb1207b9"}, "created_at": 1666728758.105052, "compiled_code": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n ad_id, date_day, ad_group_id\n from `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__ad_report`\n group by ad_id, date_day, ad_group_id\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": null, "file_key_name": "models.stg_apple_search_ads__ad_report"}, "test.apple_search_ads_source.not_null_stg_apple_search_ads__campaign_history_modified_at.f34a7a97c9": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "modified_at", "model": "{{ get_where_subquery(ref('stg_apple_search_ads__campaign_history')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__campaign_history"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads_source", "not_null_stg_apple_search_ads__campaign_history_modified_at"], "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__campaign_history_modified_at.f34a7a97c9", "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "not_null_stg_apple_search_ads__campaign_history_modified_at.sql", "original_file_path": "models/stg_apple_search_ads.yml", "name": "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": ""}, "tags": [], "refs": [["stg_apple_search_ads__campaign_history"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads.yml/not_null_stg_apple_search_ads__campaign_history_modified_at.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1666728758.107518, "compiled_code": "\n \n \n\n\n\nselect modified_at\nfrom `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__campaign_history`\nwhere modified_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "modified_at", "file_key_name": "models.stg_apple_search_ads__campaign_history"}, "test.apple_search_ads_source.not_null_stg_apple_search_ads__campaign_history_campaign_id.3f0f7502b8": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "campaign_id", "model": "{{ get_where_subquery(ref('stg_apple_search_ads__campaign_history')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__campaign_history"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads_source", "not_null_stg_apple_search_ads__campaign_history_campaign_id"], "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__campaign_history_campaign_id.3f0f7502b8", "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "not_null_stg_apple_search_ads__campaign_history_campaign_id.sql", "original_file_path": "models/stg_apple_search_ads.yml", "name": "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": ""}, "tags": [], "refs": [["stg_apple_search_ads__campaign_history"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads.yml/not_null_stg_apple_search_ads__campaign_history_campaign_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1666728758.108326, "compiled_code": "\n \n \n\n\n\nselect campaign_id\nfrom `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__campaign_history`\nwhere campaign_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "campaign_id", "file_key_name": "models.stg_apple_search_ads__campaign_history"}, "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__campaign_history_campaign_id__modified_at.317f970af9": {"test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["campaign_id", "modified_at"], "model": "{{ get_where_subquery(ref('stg_apple_search_ads__campaign_history')) }}"}, "namespace": "dbt_utils"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_utils.test_unique_combination_of_columns", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__campaign_history"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_055fa7e8a6c292e0f56d1feec61284a9", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads_source", "dbt_utils_unique_combination_of_columns_stg_apple_search_ads__campaign_history_campaign_id__modified_at"], "unique_id": "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__campaign_history_campaign_id__modified_at.317f970af9", "raw_code": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_055fa7e8a6c292e0f56d1feec61284a9\") }}", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "dbt_utils_unique_combination_o_055fa7e8a6c292e0f56d1feec61284a9.sql", "original_file_path": "models/stg_apple_search_ads.yml", "name": "dbt_utils_unique_combination_of_columns_stg_apple_search_ads__campaign_history_campaign_id__modified_at", "alias": "dbt_utils_unique_combination_o_055fa7e8a6c292e0f56d1feec61284a9", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_apple_search_ads__campaign_history"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads.yml/dbt_utils_unique_combination_o_055fa7e8a6c292e0f56d1feec61284a9.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_055fa7e8a6c292e0f56d1feec61284a9"}, "created_at": 1666728758.109264, "compiled_code": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n campaign_id, modified_at\n from `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__campaign_history`\n group by campaign_id, modified_at\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": null, "file_key_name": "models.stg_apple_search_ads__campaign_history"}, "test.apple_search_ads_source.not_null_stg_apple_search_ads__campaign_report_campaign_id.b83941e728": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "campaign_id", "model": "{{ get_where_subquery(ref('stg_apple_search_ads__campaign_report')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__campaign_report"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads_source", "not_null_stg_apple_search_ads__campaign_report_campaign_id"], "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__campaign_report_campaign_id.b83941e728", "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "not_null_stg_apple_search_ads__campaign_report_campaign_id.sql", "original_file_path": "models/stg_apple_search_ads.yml", "name": "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": ""}, "tags": [], "refs": [["stg_apple_search_ads__campaign_report"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads.yml/not_null_stg_apple_search_ads__campaign_report_campaign_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1666728758.1115808, "compiled_code": "\n \n \n\n\n\nselect campaign_id\nfrom `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__campaign_report`\nwhere campaign_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "campaign_id", "file_key_name": "models.stg_apple_search_ads__campaign_report"}, "test.apple_search_ads_source.not_null_stg_apple_search_ads__campaign_report_date_day.c8dc10a6f3": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('stg_apple_search_ads__campaign_report')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__campaign_report"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads_source", "not_null_stg_apple_search_ads__campaign_report_date_day"], "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__campaign_report_date_day.c8dc10a6f3", "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "not_null_stg_apple_search_ads__campaign_report_date_day.sql", "original_file_path": "models/stg_apple_search_ads.yml", "name": "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": ""}, "tags": [], "refs": [["stg_apple_search_ads__campaign_report"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads.yml/not_null_stg_apple_search_ads__campaign_report_date_day.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1666728758.112414, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__campaign_report`\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "date_day", "file_key_name": "models.stg_apple_search_ads__campaign_report"}, "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__campaign_report_campaign_id__date_day.bad41b0481": {"test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["campaign_id", "date_day"], "model": "{{ get_where_subquery(ref('stg_apple_search_ads__campaign_report')) }}"}, "namespace": "dbt_utils"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_utils.test_unique_combination_of_columns", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__campaign_report"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_d8bdb244aa45cb237ef5189371733c07", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads_source", "dbt_utils_unique_combination_of_columns_stg_apple_search_ads__campaign_report_campaign_id__date_day"], "unique_id": "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__campaign_report_campaign_id__date_day.bad41b0481", "raw_code": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_d8bdb244aa45cb237ef5189371733c07\") }}", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "dbt_utils_unique_combination_o_d8bdb244aa45cb237ef5189371733c07.sql", "original_file_path": "models/stg_apple_search_ads.yml", "name": "dbt_utils_unique_combination_of_columns_stg_apple_search_ads__campaign_report_campaign_id__date_day", "alias": "dbt_utils_unique_combination_o_d8bdb244aa45cb237ef5189371733c07", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_apple_search_ads__campaign_report"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads.yml/dbt_utils_unique_combination_o_d8bdb244aa45cb237ef5189371733c07.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_d8bdb244aa45cb237ef5189371733c07"}, "created_at": 1666728758.113218, "compiled_code": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n campaign_id, date_day\n from `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__campaign_report`\n group by campaign_id, date_day\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": null, "file_key_name": "models.stg_apple_search_ads__campaign_report"}, "test.apple_search_ads_source.not_null_stg_apple_search_ads__keyword_history_modified_at.42fde5a287": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "modified_at", "model": "{{ get_where_subquery(ref('stg_apple_search_ads__keyword_history')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__keyword_history"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads_source", "not_null_stg_apple_search_ads__keyword_history_modified_at"], "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__keyword_history_modified_at.42fde5a287", "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "not_null_stg_apple_search_ads__keyword_history_modified_at.sql", "original_file_path": "models/stg_apple_search_ads.yml", "name": "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": ""}, "tags": [], "refs": [["stg_apple_search_ads__keyword_history"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads.yml/not_null_stg_apple_search_ads__keyword_history_modified_at.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1666728758.115524, "compiled_code": "\n \n \n\n\n\nselect modified_at\nfrom `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__keyword_history`\nwhere modified_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "modified_at", "file_key_name": "models.stg_apple_search_ads__keyword_history"}, "test.apple_search_ads_source.not_null_stg_apple_search_ads__keyword_history_keyword_id.889f83cfd2": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "keyword_id", "model": "{{ get_where_subquery(ref('stg_apple_search_ads__keyword_history')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__keyword_history"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads_source", "not_null_stg_apple_search_ads__keyword_history_keyword_id"], "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__keyword_history_keyword_id.889f83cfd2", "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "not_null_stg_apple_search_ads__keyword_history_keyword_id.sql", "original_file_path": "models/stg_apple_search_ads.yml", "name": "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": ""}, "tags": [], "refs": [["stg_apple_search_ads__keyword_history"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads.yml/not_null_stg_apple_search_ads__keyword_history_keyword_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1666728758.116332, "compiled_code": "\n \n \n\n\n\nselect keyword_id\nfrom `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__keyword_history`\nwhere keyword_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "keyword_id", "file_key_name": "models.stg_apple_search_ads__keyword_history"}, "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__keyword_history_keyword_id__modified_at.7b06162d24": {"test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["keyword_id", "modified_at"], "model": "{{ get_where_subquery(ref('stg_apple_search_ads__keyword_history')) }}"}, "namespace": "dbt_utils"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_utils.test_unique_combination_of_columns", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__keyword_history"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_26b09b2f81a50b0ba84b566cd7df85b5", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads_source", "dbt_utils_unique_combination_of_columns_stg_apple_search_ads__keyword_history_keyword_id__modified_at"], "unique_id": "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__keyword_history_keyword_id__modified_at.7b06162d24", "raw_code": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_26b09b2f81a50b0ba84b566cd7df85b5\") }}", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "dbt_utils_unique_combination_o_26b09b2f81a50b0ba84b566cd7df85b5.sql", "original_file_path": "models/stg_apple_search_ads.yml", "name": "dbt_utils_unique_combination_of_columns_stg_apple_search_ads__keyword_history_keyword_id__modified_at", "alias": "dbt_utils_unique_combination_o_26b09b2f81a50b0ba84b566cd7df85b5", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_apple_search_ads__keyword_history"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads.yml/dbt_utils_unique_combination_o_26b09b2f81a50b0ba84b566cd7df85b5.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_26b09b2f81a50b0ba84b566cd7df85b5"}, "created_at": 1666728758.117153, "compiled_code": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n keyword_id, modified_at\n from `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__keyword_history`\n group by keyword_id, modified_at\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": null, "file_key_name": "models.stg_apple_search_ads__keyword_history"}, "test.apple_search_ads_source.not_null_stg_apple_search_ads__keyword_report_keyword_id.501725b09e": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "keyword_id", "model": "{{ get_where_subquery(ref('stg_apple_search_ads__keyword_report')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__keyword_report"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads_source", "not_null_stg_apple_search_ads__keyword_report_keyword_id"], "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__keyword_report_keyword_id.501725b09e", "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "not_null_stg_apple_search_ads__keyword_report_keyword_id.sql", "original_file_path": "models/stg_apple_search_ads.yml", "name": "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": ""}, "tags": [], "refs": [["stg_apple_search_ads__keyword_report"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads.yml/not_null_stg_apple_search_ads__keyword_report_keyword_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1666728758.1194549, "compiled_code": "\n \n \n\n\n\nselect keyword_id\nfrom `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__keyword_report`\nwhere keyword_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "keyword_id", "file_key_name": "models.stg_apple_search_ads__keyword_report"}, "test.apple_search_ads_source.not_null_stg_apple_search_ads__keyword_report_date_day.16098db928": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('stg_apple_search_ads__keyword_report')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__keyword_report"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads_source", "not_null_stg_apple_search_ads__keyword_report_date_day"], "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__keyword_report_date_day.16098db928", "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "not_null_stg_apple_search_ads__keyword_report_date_day.sql", "original_file_path": "models/stg_apple_search_ads.yml", "name": "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": ""}, "tags": [], "refs": [["stg_apple_search_ads__keyword_report"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads.yml/not_null_stg_apple_search_ads__keyword_report_date_day.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1666728758.120259, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__keyword_report`\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "date_day", "file_key_name": "models.stg_apple_search_ads__keyword_report"}, "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__keyword_report_keyword_id__date_day.9f0099cff8": {"test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["keyword_id", "date_day"], "model": "{{ get_where_subquery(ref('stg_apple_search_ads__keyword_report')) }}"}, "namespace": "dbt_utils"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_utils.test_unique_combination_of_columns", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__keyword_report"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_2ec7f68205f05a3b68cfa7324135a1a5", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads_source", "dbt_utils_unique_combination_of_columns_stg_apple_search_ads__keyword_report_keyword_id__date_day"], "unique_id": "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__keyword_report_keyword_id__date_day.9f0099cff8", "raw_code": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_2ec7f68205f05a3b68cfa7324135a1a5\") }}", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "dbt_utils_unique_combination_o_2ec7f68205f05a3b68cfa7324135a1a5.sql", "original_file_path": "models/stg_apple_search_ads.yml", "name": "dbt_utils_unique_combination_of_columns_stg_apple_search_ads__keyword_report_keyword_id__date_day", "alias": "dbt_utils_unique_combination_o_2ec7f68205f05a3b68cfa7324135a1a5", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_apple_search_ads__keyword_report"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads.yml/dbt_utils_unique_combination_o_2ec7f68205f05a3b68cfa7324135a1a5.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_2ec7f68205f05a3b68cfa7324135a1a5"}, "created_at": 1666728758.1211898, "compiled_code": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n keyword_id, date_day\n from `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__keyword_report`\n group by keyword_id, date_day\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": null, "file_key_name": "models.stg_apple_search_ads__keyword_report"}, "test.apple_search_ads_source.not_null_stg_apple_search_ads__organization_organization_id.b013ce33cb": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "organization_id", "model": "{{ get_where_subquery(ref('stg_apple_search_ads__organization')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__organization"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads_source", "not_null_stg_apple_search_ads__organization_organization_id"], "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__organization_organization_id.b013ce33cb", "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "not_null_stg_apple_search_ads__organization_organization_id.sql", "original_file_path": "models/stg_apple_search_ads.yml", "name": "not_null_stg_apple_search_ads__organization_organization_id", "alias": "not_null_stg_apple_search_ads__organization_organization_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_apple_search_ads__organization"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads.yml/not_null_stg_apple_search_ads__organization_organization_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1666728758.123502, "compiled_code": "\n \n \n\n\n\nselect organization_id\nfrom `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__organization`\nwhere organization_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "organization_id", "file_key_name": "models.stg_apple_search_ads__organization"}, "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__organization_organization_id.8647048f7a": {"test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["organization_id"], "model": "{{ get_where_subquery(ref('stg_apple_search_ads__organization')) }}"}, "namespace": "dbt_utils"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_utils.test_unique_combination_of_columns", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__organization"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_53ded9060f9d3981217ae23e5d2ba89b", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads_source", "dbt_utils_unique_combination_of_columns_stg_apple_search_ads__organization_organization_id"], "unique_id": "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__organization_organization_id.8647048f7a", "raw_code": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_53ded9060f9d3981217ae23e5d2ba89b\") }}", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "dbt_utils_unique_combination_o_53ded9060f9d3981217ae23e5d2ba89b.sql", "original_file_path": "models/stg_apple_search_ads.yml", "name": "dbt_utils_unique_combination_of_columns_stg_apple_search_ads__organization_organization_id", "alias": "dbt_utils_unique_combination_o_53ded9060f9d3981217ae23e5d2ba89b", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_apple_search_ads__organization"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads.yml/dbt_utils_unique_combination_o_53ded9060f9d3981217ae23e5d2ba89b.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_53ded9060f9d3981217ae23e5d2ba89b"}, "created_at": 1666728758.124318, "compiled_code": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n organization_id\n from `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__organization`\n group by organization_id\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": null, "file_key_name": "models.stg_apple_search_ads__organization"}, "test.apple_search_ads_source.not_null_stg_apple_search_ads__search_term_report__fivetran_id.aa430d1dad": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "_fivetran_id", "model": "{{ get_where_subquery(ref('stg_apple_search_ads__search_term_report')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__search_term_report"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads_source", "not_null_stg_apple_search_ads__search_term_report__fivetran_id"], "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__search_term_report__fivetran_id.aa430d1dad", "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "not_null_stg_apple_search_ads__search_term_report__fivetran_id.sql", "original_file_path": "models/stg_apple_search_ads.yml", "name": "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": ""}, "tags": [], "refs": [["stg_apple_search_ads__search_term_report"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads.yml/not_null_stg_apple_search_ads__search_term_report__fivetran_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1666728758.126466, "compiled_code": "\n \n \n\n\n\nselect _fivetran_id\nfrom `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__search_term_report`\nwhere _fivetran_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "_fivetran_id", "file_key_name": "models.stg_apple_search_ads__search_term_report"}, "test.apple_search_ads_source.not_null_stg_apple_search_ads__search_term_report_date_day.fd93df3302": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('stg_apple_search_ads__search_term_report')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__search_term_report"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads_source", "not_null_stg_apple_search_ads__search_term_report_date_day"], "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__search_term_report_date_day.fd93df3302", "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "not_null_stg_apple_search_ads__search_term_report_date_day.sql", "original_file_path": "models/stg_apple_search_ads.yml", "name": "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": ""}, "tags": [], "refs": [["stg_apple_search_ads__search_term_report"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads.yml/not_null_stg_apple_search_ads__search_term_report_date_day.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1666728758.12727, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__search_term_report`\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "date_day", "file_key_name": "models.stg_apple_search_ads__search_term_report"}, "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__search_term_report__fivetran_id__date_day.aad2a48344": {"test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["_fivetran_id", "date_day"], "model": "{{ get_where_subquery(ref('stg_apple_search_ads__search_term_report')) }}"}, "namespace": "dbt_utils"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_utils.test_unique_combination_of_columns", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__search_term_report"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_4b957c6b8a75dcd1a6055884f71d71c1", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads_source", "dbt_utils_unique_combination_of_columns_stg_apple_search_ads__search_term_report__fivetran_id__date_day"], "unique_id": "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__search_term_report__fivetran_id__date_day.aad2a48344", "raw_code": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_4b957c6b8a75dcd1a6055884f71d71c1\") }}", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "dbt_utils_unique_combination_o_4b957c6b8a75dcd1a6055884f71d71c1.sql", "original_file_path": "models/stg_apple_search_ads.yml", "name": "dbt_utils_unique_combination_of_columns_stg_apple_search_ads__search_term_report__fivetran_id__date_day", "alias": "dbt_utils_unique_combination_o_4b957c6b8a75dcd1a6055884f71d71c1", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_apple_search_ads__search_term_report"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads.yml/dbt_utils_unique_combination_o_4b957c6b8a75dcd1a6055884f71d71c1.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_4b957c6b8a75dcd1a6055884f71d71c1"}, "created_at": 1666728758.1280682, "compiled_code": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n _fivetran_id, date_day\n from `dbt-package-testing`.`apple_search_ads_integration_tests_apple_search_ads_source`.`stg_apple_search_ads__search_term_report`\n group by _fivetran_id, date_day\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": null, "file_key_name": "models.stg_apple_search_ads__search_term_report"}}, "sources": {"source.apple_search_ads_source.apple_search_ads.ad_group_history": {"fqn": ["apple_search_ads_source", "apple_search_ads", "ad_group_history"], "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests", "unique_id": "source.apple_search_ads_source.apple_search_ads.ad_group_history", "package_name": "apple_search_ads_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "models/src_apple_search_ads.yml", "original_file_path": "models/src_apple_search_ads.yml", "name": "ad_group_history", "source_name": "apple_search_ads", "source_description": "", "loader": "Fivetran", "identifier": "ad_group_history_data", "resource_type": "source", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "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, "quote": null, "tags": []}, "id": {"name": "id", "description": "Ad group ID associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_id": {"name": "campaign_id", "description": "Campaign ID associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "start_time": {"name": "start_time", "description": "Timestamp of designated ad group start time.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "end_time": {"name": "end_time", "description": "The designated ad group end time.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "name": {"name": "name", "description": "Ad group name.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "organization_id": {"name": "organization_id", "description": "Organization ID associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "status": {"name": "status", "description": "The current status of the ad group, values include ENABLED and PAUSED.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {"enabled": true}, "relation_name": "`dbt-package-testing`.`apple_search_ads_integration_tests`.`ad_group_history_data`", "created_at": 1666728758.130291}, "source.apple_search_ads_source.apple_search_ads.ad_group_report": {"fqn": ["apple_search_ads_source", "apple_search_ads", "ad_group_report"], "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests", "unique_id": "source.apple_search_ads_source.apple_search_ads.ad_group_report", "package_name": "apple_search_ads_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "models/src_apple_search_ads.yml", "original_file_path": "models/src_apple_search_ads.yml", "name": "ad_group_report", "source_name": "apple_search_ads", "source_description": "", "loader": "Fivetran", "identifier": "ad_group_report_data", "resource_type": "source", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "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, "quote": null, "tags": []}, "date": {"name": "date", "description": "Date for daily report aggregation.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "impressions": {"name": "impressions", "description": "Number of times your ad appeared in App Store search results.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "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, "quote": null, "tags": []}, "local_spend_currency": {"name": "local_spend_currency", "description": "This currency value should match the respective organization's currency value.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "new_downloads": {"name": "new_downloads", "description": "App downloads from new users who have never before installed the respective app.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "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.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "taps": {"name": "taps", "description": "The number of times ad was tapped by users within the reporting time period.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {"enabled": true}, "relation_name": "`dbt-package-testing`.`apple_search_ads_integration_tests`.`ad_group_report_data`", "created_at": 1666728758.130379}, "source.apple_search_ads_source.apple_search_ads.ad_history": {"fqn": ["apple_search_ads_source", "apple_search_ads", "ad_history"], "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests", "unique_id": "source.apple_search_ads_source.apple_search_ads.ad_history", "package_name": "apple_search_ads_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "models/src_apple_search_ads.yml", "original_file_path": "models/src_apple_search_ads.yml", "name": "ad_history", "source_name": "apple_search_ads", "source_description": "", "loader": "Fivetran", "identifier": "ad_history_data", "resource_type": "source", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "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, "quote": null, "tags": []}, "modification_time": {"name": "modification_time", "description": "Timestamp of when the ad object was last modified.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "org_id": {"name": "org_id", "description": "Organization ID associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_id": {"name": "campaign_id", "description": "Campaign ID associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "ad_group_id": {"name": "ad_group_id", "description": "Ad group ID associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "name": {"name": "name", "description": "Ad name associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "id": {"name": "id", "description": "Ad ID associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "status": {"name": "status", "description": "The current status of the ad, values include ENABLED and PAUSED.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {"enabled": true}, "relation_name": "`dbt-package-testing`.`apple_search_ads_integration_tests`.`ad_history_data`", "created_at": 1666728758.130451}, "source.apple_search_ads_source.apple_search_ads.ad_level_report": {"fqn": ["apple_search_ads_source", "apple_search_ads", "ad_level_report"], "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests", "unique_id": "source.apple_search_ads_source.apple_search_ads.ad_level_report", "package_name": "apple_search_ads_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "models/src_apple_search_ads.yml", "original_file_path": "models/src_apple_search_ads.yml", "name": "ad_level_report", "source_name": "apple_search_ads", "source_description": "", "loader": "Fivetran", "identifier": "ad_report_data", "resource_type": "source", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "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, "quote": null, "tags": []}, "campaign_id": {"name": "campaign_id", "description": "Campaign ID associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "ad_group_id": {"name": "ad_group_id", "description": "Ad group ID associated with the record", "meta": {}, "data_type": null, "quote": null, "tags": []}, "ad_id": {"name": "ad_id", "description": "Ad ID associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "impressions": {"name": "impressions", "description": "Number of times your ad appeared in App Store search results.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "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, "quote": null, "tags": []}, "local_spend_currency": {"name": "local_spend_currency", "description": "This currency value should match the respective organization's currency value.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "new_downloads": {"name": "new_downloads", "description": "App downloads from new users who have never before installed the respective app.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "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.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "taps": {"name": "taps", "description": "The number of times ad was tapped by users within the reporting time period.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {"enabled": true}, "relation_name": "`dbt-package-testing`.`apple_search_ads_integration_tests`.`ad_report_data`", "created_at": 1666728758.130522}, "source.apple_search_ads_source.apple_search_ads.campaign_history": {"fqn": ["apple_search_ads_source", "apple_search_ads", "campaign_history"], "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests", "unique_id": "source.apple_search_ads_source.apple_search_ads.campaign_history", "package_name": "apple_search_ads_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "models/src_apple_search_ads.yml", "original_file_path": "models/src_apple_search_ads.yml", "name": "campaign_history", "source_name": "apple_search_ads", "source_description": "", "loader": "Fivetran", "identifier": "campaign_history_data", "resource_type": "source", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "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, "quote": null, "tags": []}, "id": {"name": "id", "description": "Campaign ID associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "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, "quote": null, "tags": []}, "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, "quote": null, "tags": []}, "name": {"name": "name", "description": "Campaign name for the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "organization_id": {"name": "organization_id", "description": "Organization ID associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "status": {"name": "status", "description": "The current status of the campaign, values include ENABLED and PAUSED.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {"enabled": true}, "relation_name": "`dbt-package-testing`.`apple_search_ads_integration_tests`.`campaign_history_data`", "created_at": 1666728758.1305878}, "source.apple_search_ads_source.apple_search_ads.campaign_report": {"fqn": ["apple_search_ads_source", "apple_search_ads", "campaign_report"], "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests", "unique_id": "source.apple_search_ads_source.apple_search_ads.campaign_report", "package_name": "apple_search_ads_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "models/src_apple_search_ads.yml", "original_file_path": "models/src_apple_search_ads.yml", "name": "campaign_report", "source_name": "apple_search_ads", "source_description": "", "loader": "Fivetran", "identifier": "campaign_report_data", "resource_type": "source", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "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, "quote": null, "tags": []}, "date": {"name": "date", "description": "Date for daily report aggregation.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "impressions": {"name": "impressions", "description": "Number of times your ad appeared in App Store search results.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "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, "quote": null, "tags": []}, "local_spend_currency": {"name": "local_spend_currency", "description": "This currency value should match the respective organization's currency value.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "new_downloads": {"name": "new_downloads", "description": "App downloads from new users who have never before installed the respective app.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "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.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "taps": {"name": "taps", "description": "The number of times ad was tapped by users within the reporting time period.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {"enabled": true}, "relation_name": "`dbt-package-testing`.`apple_search_ads_integration_tests`.`campaign_report_data`", "created_at": 1666728758.1306539}, "source.apple_search_ads_source.apple_search_ads.keyword_history": {"fqn": ["apple_search_ads_source", "apple_search_ads", "keyword_history"], "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests", "unique_id": "source.apple_search_ads_source.apple_search_ads.keyword_history", "package_name": "apple_search_ads_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "models/src_apple_search_ads.yml", "original_file_path": "models/src_apple_search_ads.yml", "name": "keyword_history", "source_name": "apple_search_ads", "source_description": "", "loader": "Fivetran", "identifier": "keyword_history_data", "resource_type": "source", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "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, "quote": null, "tags": []}, "id": {"name": "id", "description": "Keyword ID associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_id": {"name": "campaign_id", "description": "Campaign ID associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "ad_group_id": {"name": "ad_group_id", "description": "Ad group ID associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "bid_amount": {"name": "bid_amount", "description": "The bid amount to display your ad for the matching text value.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "bid_currency": {"name": "bid_currency", "description": "This currency value should match the respective organization's currency value.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "match_type": {"name": "match_type", "description": "Controls how ads are matched to user searches; EXACT or BROAD.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "status": {"name": "status", "description": "The current status of the keyword, values include ENABLED and PAUSED.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "text": {"name": "text", "description": "The word or phrase to match in user searches, to show respective ad.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {"enabled": true}, "relation_name": "`dbt-package-testing`.`apple_search_ads_integration_tests`.`keyword_history_data`", "created_at": 1666728758.130722}, "source.apple_search_ads_source.apple_search_ads.keyword_report": {"fqn": ["apple_search_ads_source", "apple_search_ads", "keyword_report"], "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests", "unique_id": "source.apple_search_ads_source.apple_search_ads.keyword_report", "package_name": "apple_search_ads_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "models/src_apple_search_ads.yml", "original_file_path": "models/src_apple_search_ads.yml", "name": "keyword_report", "source_name": "apple_search_ads", "source_description": "", "loader": "Fivetran", "identifier": "keyword_report_data", "resource_type": "source", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "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, "quote": null, "tags": []}, "date": {"name": "date", "description": "Date for daily report aggregation.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "impressions": {"name": "impressions", "description": "Number of times your ad appeared in App Store search results.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "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, "quote": null, "tags": []}, "local_spend_currency": {"name": "local_spend_currency", "description": "This currency value should match the respective organization's currency value.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "new_downloads": {"name": "new_downloads", "description": "App downloads from new users who have never before installed the respective app.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "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.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "taps": {"name": "taps", "description": "The number of times ad was tapped by users within the reporting time period.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {"enabled": true}, "relation_name": "`dbt-package-testing`.`apple_search_ads_integration_tests`.`keyword_report_data`", "created_at": 1666728758.130789}, "source.apple_search_ads_source.apple_search_ads.organization": {"fqn": ["apple_search_ads_source", "apple_search_ads", "organization"], "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests", "unique_id": "source.apple_search_ads_source.apple_search_ads.organization", "package_name": "apple_search_ads_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "models/src_apple_search_ads.yml", "original_file_path": "models/src_apple_search_ads.yml", "name": "organization", "source_name": "apple_search_ads", "source_description": "", "loader": "Fivetran", "identifier": "organization_data", "resource_type": "source", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "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, "quote": null, "tags": []}, "currency": {"name": "currency", "description": "Specified currency for respective organization.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "payment_model": {"name": "payment_model", "description": "Values include 'LOC', 'PAYG' or (payment method hasn't been set).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "organization_name": {"name": "organization_name", "description": "Name of organization.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "time_zone": {"name": "time_zone", "description": "Organization default timezone; values can be ORTZ or UTC.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {"enabled": true}, "relation_name": "`dbt-package-testing`.`apple_search_ads_integration_tests`.`organization_data`", "created_at": 1666728758.130854}, "source.apple_search_ads_source.apple_search_ads.search_term_report": {"fqn": ["apple_search_ads_source", "apple_search_ads", "search_term_report"], "database": "dbt-package-testing", "schema": "apple_search_ads_integration_tests", "unique_id": "source.apple_search_ads_source.apple_search_ads.search_term_report", "package_name": "apple_search_ads_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "models/src_apple_search_ads.yml", "original_file_path": "models/src_apple_search_ads.yml", "name": "search_term_report", "source_name": "apple_search_ads", "source_description": "", "loader": "Fivetran", "identifier": "search_term_report_data", "resource_type": "source", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "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, "quote": null, "tags": []}, "ad_group_id": {"name": "ad_group_id", "description": "Ad group ID associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_id": {"name": "campaign_id", "description": "Campaign ID associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "date": {"name": "date", "description": "Date for daily report aggregation.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "ad_group_name": {"name": "ad_group_name", "description": "Ad group name.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "bid_amount_amount": {"name": "bid_amount_amount", "description": "The bid amount to display your ad for the matching text value.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "bid_amount_currency": {"name": "bid_amount_currency", "description": "This currency value should match the respective organization's currency value.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "keyword": {"name": "keyword", "description": "The word or phrase to match in user searches, to show respective ad.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "keyword_display_status": {"name": "keyword_display_status", "description": "The keyword display status can either be ACTIVE or PAUSED.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "keyword_id": {"name": "keyword_id", "description": "Keyword ID associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "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, "quote": null, "tags": []}, "local_spend_currency": {"name": "local_spend_currency", "description": "This currency value should match the respective organization's currency value.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "match_type": {"name": "match_type", "description": "Controls how ads are matched to user searches; values include EXACT, BROAD or AUTO.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "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, "quote": null, "tags": []}, "search_term_text": {"name": "search_term_text", "description": "The word or phrase to match of user searches.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "impressions": {"name": "impressions", "description": "Number of times your ad appeared in App Store search results.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "taps": {"name": "taps", "description": "The number of times ad was tapped by users within the reporting time period.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "new_downloads": {"name": "new_downloads", "description": "App downloads from new users who have never before installed the respective app.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "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.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": "True and True"}, "patch_path": null, "unrendered_config": {"enabled": "True and True"}, "relation_name": "`dbt-package-testing`.`apple_search_ads_integration_tests`.`search_term_report_data`", "created_at": 1666728758.130933}}, "macros": {"macro.dbt_bigquery.date_sharded_table": {"unique_id": "macro.dbt_bigquery.date_sharded_table", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/bigquery", "path": "macros/etc.sql", "original_file_path": "macros/etc.sql", "name": "date_sharded_table", "macro_sql": "{% macro date_sharded_table(base_name) %}\n {{ return(base_name ~ \"[DBT__PARTITION_DATE]\") }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.272863, "supported_languages": null}, "macro.dbt_bigquery.grant_access_to": {"unique_id": "macro.dbt_bigquery.grant_access_to", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/bigquery", "path": "macros/etc.sql", "original_file_path": "macros/etc.sql", "name": "grant_access_to", "macro_sql": "{% macro grant_access_to(entity, entity_type, role, grant_target_dict) -%}\n {% do adapter.grant_access_to(entity, entity_type, role, grant_target_dict) %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.273071, "supported_languages": null}, "macro.dbt_bigquery.get_partitions_metadata": {"unique_id": "macro.dbt_bigquery.get_partitions_metadata", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/bigquery", "path": "macros/etc.sql", "original_file_path": "macros/etc.sql", "name": "get_partitions_metadata", "macro_sql": "\n\n{%- macro get_partitions_metadata(table) -%}\n {%- if execute -%}\n {%- set res = adapter.get_partitions_metadata(table) -%}\n {{- return(res) -}}\n {%- endif -%}\n {{- return(None) -}}\n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.2733219, "supported_languages": null}, "macro.dbt_bigquery.bigquery__get_catalog": {"unique_id": "macro.dbt_bigquery.bigquery__get_catalog", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/bigquery", "path": "macros/catalog.sql", "original_file_path": "macros/catalog.sql", "name": "bigquery__get_catalog", "macro_sql": "{% macro bigquery__get_catalog(information_schema, schemas) -%}\n\n {%- if (schemas | length) == 0 -%}\n {# Hopefully nothing cares about the columns we return when there are no rows #}\n {%- set query = \"select 1 as id limit 0\" -%}\n {%- else -%}\n\n {%- set query -%}\n with tables as (\n select\n project_id as table_database,\n dataset_id as table_schema,\n table_id as original_table_name,\n\n concat(project_id, '.', dataset_id, '.', table_id) as relation_id,\n\n row_count,\n size_bytes as size_bytes,\n case\n when type = 1 then 'table'\n when type = 2 then 'view'\n else 'external'\n end as table_type,\n\n REGEXP_CONTAINS(table_id, '^.+[0-9]{8}$') and coalesce(type, 0) = 1 as is_date_shard,\n REGEXP_EXTRACT(table_id, '^(.+)[0-9]{8}$') as shard_base_name,\n REGEXP_EXTRACT(table_id, '^.+([0-9]{8})$') as shard_name\n\n from {{ information_schema.replace(information_schema_view='__TABLES__') }}\n where (\n {%- for schema in schemas -%}\n upper(dataset_id) = upper('{{ schema }}'){%- if not loop.last %} or {% endif -%}\n {%- endfor -%}\n )\n ),\n\n extracted as (\n\n select *,\n case\n when is_date_shard then shard_base_name\n else original_table_name\n end as table_name\n\n from tables\n\n ),\n\n unsharded_tables as (\n\n select\n table_database,\n table_schema,\n table_name,\n coalesce(table_type, 'external') as table_type,\n is_date_shard,\n\n struct(\n min(shard_name) as shard_min,\n max(shard_name) as shard_max,\n count(*) as shard_count\n ) as table_shards,\n\n sum(size_bytes) as size_bytes,\n sum(row_count) as row_count,\n\n max(relation_id) as relation_id\n\n from extracted\n group by 1,2,3,4,5\n\n ),\n\n info_schema_columns as (\n\n select\n concat(table_catalog, '.', table_schema, '.', table_name) as relation_id,\n table_catalog as table_database,\n table_schema,\n table_name,\n\n -- use the \"real\" column name from the paths query below\n column_name as base_column_name,\n ordinal_position as column_index,\n\n is_partitioning_column,\n clustering_ordinal_position\n\n from {{ information_schema.replace(information_schema_view='COLUMNS') }}\n where ordinal_position is not null\n\n ),\n\n info_schema_column_paths as (\n\n select\n concat(table_catalog, '.', table_schema, '.', table_name) as relation_id,\n field_path as column_name,\n data_type as column_type,\n column_name as base_column_name,\n description as column_comment\n\n from {{ information_schema.replace(information_schema_view='COLUMN_FIELD_PATHS') }}\n\n ),\n\n columns as (\n\n select * except (base_column_name)\n from info_schema_columns\n join info_schema_column_paths using (relation_id, base_column_name)\n\n ),\n\n column_stats as (\n\n select\n table_database,\n table_schema,\n table_name,\n max(relation_id) as relation_id,\n max(case when is_partitioning_column = 'YES' then 1 else 0 end) = 1 as is_partitioned,\n max(case when is_partitioning_column = 'YES' then column_name else null end) as partition_column,\n max(case when clustering_ordinal_position is not null then 1 else 0 end) = 1 as is_clustered,\n array_to_string(\n array_agg(\n case\n when clustering_ordinal_position is not null then column_name\n else null\n end ignore nulls\n order by clustering_ordinal_position\n ), ', '\n ) as clustering_columns\n\n from columns\n group by 1,2,3\n\n )\n\n select\n unsharded_tables.table_database,\n unsharded_tables.table_schema,\n case\n when is_date_shard then concat(unsharded_tables.table_name, '*')\n else unsharded_tables.table_name\n end as table_name,\n unsharded_tables.table_type,\n\n -- coalesce name and type for External tables - these columns are not\n -- present in the COLUMN_FIELD_PATHS resultset\n coalesce(columns.column_name, '') as column_name,\n -- invent a row number to account for nested fields -- BQ does\n -- not treat these nested properties as independent fields\n row_number() over (\n partition by relation_id\n order by columns.column_index, columns.column_name\n ) as column_index,\n coalesce(columns.column_type, '') as column_type,\n columns.column_comment,\n\n 'Shard count' as `stats__date_shards__label`,\n table_shards.shard_count as `stats__date_shards__value`,\n 'The number of date shards in this table' as `stats__date_shards__description`,\n is_date_shard as `stats__date_shards__include`,\n\n 'Shard (min)' as `stats__date_shard_min__label`,\n table_shards.shard_min as `stats__date_shard_min__value`,\n 'The first date shard in this table' as `stats__date_shard_min__description`,\n is_date_shard as `stats__date_shard_min__include`,\n\n 'Shard (max)' as `stats__date_shard_max__label`,\n table_shards.shard_max as `stats__date_shard_max__value`,\n 'The last date shard in this table' as `stats__date_shard_max__description`,\n is_date_shard as `stats__date_shard_max__include`,\n\n '# Rows' as `stats__num_rows__label`,\n row_count as `stats__num_rows__value`,\n 'Approximate count of rows in this table' as `stats__num_rows__description`,\n (unsharded_tables.table_type = 'table') as `stats__num_rows__include`,\n\n 'Approximate Size' as `stats__num_bytes__label`,\n size_bytes as `stats__num_bytes__value`,\n 'Approximate size of table as reported by BigQuery' as `stats__num_bytes__description`,\n (unsharded_tables.table_type = 'table') as `stats__num_bytes__include`,\n\n 'Partitioned By' as `stats__partitioning_type__label`,\n partition_column as `stats__partitioning_type__value`,\n 'The partitioning column for this table' as `stats__partitioning_type__description`,\n is_partitioned as `stats__partitioning_type__include`,\n\n 'Clustered By' as `stats__clustering_fields__label`,\n clustering_columns as `stats__clustering_fields__value`,\n 'The clustering columns for this table' as `stats__clustering_fields__description`,\n is_clustered as `stats__clustering_fields__include`\n\n -- join using relation_id (an actual relation, not a shard prefix) to make\n -- sure that column metadata is picked up through the join. This will only\n -- return the column information for the \"max\" table in a date-sharded table set\n from unsharded_tables\n left join columns using (relation_id)\n left join column_stats using (relation_id)\n {%- endset -%}\n\n {%- endif -%}\n\n {{ return(run_query(query)) }}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.replace", "macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.27642, "supported_languages": null}, "macro.dbt_bigquery.partition_by": {"unique_id": "macro.dbt_bigquery.partition_by", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/bigquery", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "partition_by", "macro_sql": "{% macro partition_by(partition_config) -%}\n {%- if partition_config is none -%}\n {% do return('') %}\n {%- elif partition_config.data_type | lower in ('date','timestamp','datetime') -%}\n partition by {{ partition_config.render() }}\n {%- elif partition_config.data_type | lower in ('int64') -%}\n {%- set range = partition_config.range -%}\n partition by range_bucket(\n {{ partition_config.field }},\n generate_array({{ range.start}}, {{ range.end }}, {{ range.interval }})\n )\n {%- endif -%}\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.280206, "supported_languages": null}, "macro.dbt_bigquery.cluster_by": {"unique_id": "macro.dbt_bigquery.cluster_by", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/bigquery", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "cluster_by", "macro_sql": "{% macro cluster_by(raw_cluster_by) %}\n {%- if raw_cluster_by is not none -%}\n cluster by {% if raw_cluster_by is string -%}\n {% set raw_cluster_by = [raw_cluster_by] %}\n {%- endif -%}\n {%- for cluster in raw_cluster_by -%}\n {{ cluster }}\n {%- if not loop.last -%}, {% endif -%}\n {%- endfor -%}\n\n {% endif %}\n\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.280551, "supported_languages": null}, "macro.dbt_bigquery.bigquery_options": {"unique_id": "macro.dbt_bigquery.bigquery_options", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/bigquery", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "bigquery_options", "macro_sql": "{% macro bigquery_options(opts) %}\n {% set options -%}\n OPTIONS({% for opt_key, opt_val in opts.items() %}\n {{ opt_key }}={{ opt_val }}{{ \",\" if not loop.last }}\n {% endfor %})\n {%- endset %}\n {%- do return(options) -%}\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.280867, "supported_languages": null}, "macro.dbt_bigquery.bigquery_table_options": {"unique_id": "macro.dbt_bigquery.bigquery_table_options", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/bigquery", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "bigquery_table_options", "macro_sql": "{% macro bigquery_table_options(config, node, temporary) %}\n {% set opts = adapter.get_table_options(config, node, temporary) %}\n {%- do return(bigquery_options(opts)) -%}\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_bigquery.bigquery_options"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.2811031, "supported_languages": null}, "macro.dbt_bigquery.bigquery__create_table_as": {"unique_id": "macro.dbt_bigquery.bigquery__create_table_as", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/bigquery", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "bigquery__create_table_as", "macro_sql": "{% macro bigquery__create_table_as(temporary, relation, compiled_code, language='sql') -%}\n {%- if language == 'sql' -%}\n {%- set raw_partition_by = config.get('partition_by', none) -%}\n {%- set raw_cluster_by = config.get('cluster_by', none) -%}\n {%- set sql_header = config.get('sql_header', none) -%}\n\n {%- set partition_config = adapter.parse_partition_by(raw_partition_by) -%}\n\n {{ sql_header if sql_header is not none }}\n\n create or replace table {{ relation }}\n {{ partition_by(partition_config) }}\n {{ cluster_by(raw_cluster_by) }}\n {{ bigquery_table_options(config, model, temporary) }}\n as (\n {{ compiled_code }}\n );\n {%- elif language == 'python' -%}\n {#--\n N.B. Python models _can_ write to temp views HOWEVER they use a different session\n and have already expired by the time they need to be used (I.E. in merges for incremental models)\n\n TODO: Deep dive into spark sessions to see if we can reuse a single session for an entire\n dbt invocation.\n --#}\n {{ py_write_table(compiled_code=compiled_code, target_relation=relation.quote(database=False, schema=False, identifier=False)) }}\n {%- else -%}\n {% do exceptions.raise_compiler_error(\"bigquery__create_table_as macro didn't get supported language, it got %s\" % language) %}\n {%- endif -%}\n\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_bigquery.partition_by", "macro.dbt_bigquery.cluster_by", "macro.dbt_bigquery.bigquery_table_options", "macro.dbt_bigquery.py_write_table"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.281996, "supported_languages": null}, "macro.dbt_bigquery.bigquery_view_options": {"unique_id": "macro.dbt_bigquery.bigquery_view_options", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/bigquery", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "bigquery_view_options", "macro_sql": "{% macro bigquery_view_options(config, node) %}\n {% set opts = adapter.get_view_options(config, node) %}\n {%- do return(bigquery_options(opts)) -%}\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_bigquery.bigquery_options"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.2822158, "supported_languages": null}, "macro.dbt_bigquery.bigquery__create_view_as": {"unique_id": "macro.dbt_bigquery.bigquery__create_view_as", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/bigquery", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "bigquery__create_view_as", "macro_sql": "{% macro bigquery__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\n create or replace view {{ relation }}\n {{ bigquery_view_options(config, model) }}\n as {{ sql }};\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_bigquery.bigquery_view_options"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.2825, "supported_languages": null}, "macro.dbt_bigquery.bigquery__drop_schema": {"unique_id": "macro.dbt_bigquery.bigquery__drop_schema", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/bigquery", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "bigquery__drop_schema", "macro_sql": "{% macro bigquery__drop_schema(relation) -%}\n {{ adapter.drop_schema(relation) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.282615, "supported_languages": null}, "macro.dbt_bigquery.bigquery__drop_relation": {"unique_id": "macro.dbt_bigquery.bigquery__drop_relation", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/bigquery", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "bigquery__drop_relation", "macro_sql": "{% macro bigquery__drop_relation(relation) -%}\n {% call statement('drop_relation') -%}\n drop {{ relation.type }} if exists {{ relation }}\n {%- endcall %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.2827861, "supported_languages": null}, "macro.dbt_bigquery.bigquery__get_columns_in_relation": {"unique_id": "macro.dbt_bigquery.bigquery__get_columns_in_relation", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/bigquery", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "bigquery__get_columns_in_relation", "macro_sql": "{% macro bigquery__get_columns_in_relation(relation) -%}\n {{ return(adapter.get_columns_in_relation(relation)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.282916, "supported_languages": null}, "macro.dbt_bigquery.bigquery__list_relations_without_caching": {"unique_id": "macro.dbt_bigquery.bigquery__list_relations_without_caching", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/bigquery", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "bigquery__list_relations_without_caching", "macro_sql": "{% macro bigquery__list_relations_without_caching(schema_relation) -%}\n {{ return(adapter.list_relations_without_caching(schema_relation)) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.283046, "supported_languages": null}, "macro.dbt_bigquery.bigquery__list_schemas": {"unique_id": "macro.dbt_bigquery.bigquery__list_schemas", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/bigquery", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "bigquery__list_schemas", "macro_sql": "{% macro bigquery__list_schemas(database) -%}\n {{ return(adapter.list_schemas(database)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.2831738, "supported_languages": null}, "macro.dbt_bigquery.bigquery__check_schema_exists": {"unique_id": "macro.dbt_bigquery.bigquery__check_schema_exists", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/bigquery", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "bigquery__check_schema_exists", "macro_sql": "{% macro bigquery__check_schema_exists(information_schema, schema) %}\n {{ return(adapter.check_schema_exists(information_schema.database, schema)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.2833312, "supported_languages": null}, "macro.dbt_bigquery.bigquery__persist_docs": {"unique_id": "macro.dbt_bigquery.bigquery__persist_docs", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/bigquery", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "bigquery__persist_docs", "macro_sql": "{% macro bigquery__persist_docs(relation, model, for_relation, for_columns) -%}\n {% if for_columns and config.persist_column_docs() and model.columns %}\n {% do alter_column_comment(relation, model.columns) %}\n {% endif %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.alter_column_comment"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.283648, "supported_languages": null}, "macro.dbt_bigquery.bigquery__alter_column_comment": {"unique_id": "macro.dbt_bigquery.bigquery__alter_column_comment", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/bigquery", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "bigquery__alter_column_comment", "macro_sql": "{% macro bigquery__alter_column_comment(relation, column_dict) -%}\n {% do adapter.update_columns(relation, column_dict) %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.2837849, "supported_languages": null}, "macro.dbt_bigquery.bigquery__rename_relation": {"unique_id": "macro.dbt_bigquery.bigquery__rename_relation", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/bigquery", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "bigquery__rename_relation", "macro_sql": "{% macro bigquery__rename_relation(from_relation, to_relation) -%}\n {% do adapter.rename_relation(from_relation, to_relation) %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.283919, "supported_languages": null}, "macro.dbt_bigquery.bigquery__alter_relation_add_columns": {"unique_id": "macro.dbt_bigquery.bigquery__alter_relation_add_columns", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/bigquery", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "bigquery__alter_relation_add_columns", "macro_sql": "{% macro bigquery__alter_relation_add_columns(relation, add_columns) %}\n\n {% set sql -%}\n\n alter {{ relation.type }} {{ relation }}\n {% for column in add_columns %}\n add column {{ column.name }} {{ column.data_type }}{{ ',' if not loop.last }}\n {% endfor %}\n\n {%- endset -%}\n\n {{ return(run_query(sql)) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.284263, "supported_languages": null}, "macro.dbt_bigquery.bigquery__alter_relation_drop_columns": {"unique_id": "macro.dbt_bigquery.bigquery__alter_relation_drop_columns", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/bigquery", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "bigquery__alter_relation_drop_columns", "macro_sql": "{% macro bigquery__alter_relation_drop_columns(relation, drop_columns) %}\n\n {% set sql -%}\n\n alter {{ relation.type }} {{ relation }}\n\n {% for column in drop_columns %}\n drop column {{ column.name }}{{ ',' if not loop.last }}\n {% endfor %}\n\n {%- endset -%}\n\n {{ return(run_query(sql)) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.284597, "supported_languages": null}, "macro.dbt_bigquery.bigquery__alter_column_type": {"unique_id": "macro.dbt_bigquery.bigquery__alter_column_type", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/bigquery", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "bigquery__alter_column_type", "macro_sql": "{% macro bigquery__alter_column_type(relation, column_name, new_column_type) -%}\n {#-- Changing a column's data type using a query requires you to scan the entire table.\n The query charges can be significant if the table is very large.\n\n https://cloud.google.com/bigquery/docs/manually-changing-schemas#changing_a_columns_data_type\n #}\n {% set relation_columns = get_columns_in_relation(relation) %}\n\n {% set sql %}\n select\n {%- for col in relation_columns -%}\n {% if col.column == column_name %}\n CAST({{ col.quoted }} AS {{ new_column_type }}) AS {{ col.quoted }}\n {%- else %}\n {{ col.quoted }}\n {%- endif %}\n {%- if not loop.last %},{% endif -%}\n {%- endfor %}\n from {{ relation }}\n {% endset %}\n\n {% call statement('alter_column_type') %}\n {{ create_table_as(False, relation, sql)}}\n {%- endcall %}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.get_columns_in_relation", "macro.dbt.statement", "macro.dbt.create_table_as"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.285176, "supported_languages": null}, "macro.dbt_bigquery.bigquery__test_unique": {"unique_id": "macro.dbt_bigquery.bigquery__test_unique", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/bigquery", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "bigquery__test_unique", "macro_sql": "{% macro bigquery__test_unique(model, column_name) %}\n\nwith dbt_test__target as (\n\n select {{ column_name }} as unique_field\n from {{ model }}\n where {{ column_name }} is not null\n\n)\n\nselect\n unique_field,\n count(*) as n_records\n\nfrom dbt_test__target\ngroup by unique_field\nhaving count(*) > 1\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.285321, "supported_languages": null}, "macro.dbt_bigquery.bigquery__upload_file": {"unique_id": "macro.dbt_bigquery.bigquery__upload_file", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/bigquery", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "bigquery__upload_file", "macro_sql": "{% macro bigquery__upload_file(local_file_path, database, table_schema, table_name) %}\n\n {{ log(\"kwargs: \" ~ kwargs) }}\n\n {% do adapter.upload_file(local_file_path, database, table_schema, table_name, kwargs=kwargs) %}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.2855701, "supported_languages": null}, "macro.dbt_bigquery.bigquery__create_csv_table": {"unique_id": "macro.dbt_bigquery.bigquery__create_csv_table", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/bigquery", "path": "macros/materializations/seed.sql", "original_file_path": "macros/materializations/seed.sql", "name": "bigquery__create_csv_table", "macro_sql": "{% macro bigquery__create_csv_table(model, agate_table) %}\n -- no-op\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.285911, "supported_languages": null}, "macro.dbt_bigquery.bigquery__reset_csv_table": {"unique_id": "macro.dbt_bigquery.bigquery__reset_csv_table", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/bigquery", "path": "macros/materializations/seed.sql", "original_file_path": "macros/materializations/seed.sql", "name": "bigquery__reset_csv_table", "macro_sql": "{% macro bigquery__reset_csv_table(model, full_refresh, old_relation, agate_table) %}\n {{ adapter.drop_relation(old_relation) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.286051, "supported_languages": null}, "macro.dbt_bigquery.bigquery__load_csv_rows": {"unique_id": "macro.dbt_bigquery.bigquery__load_csv_rows", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/bigquery", "path": "macros/materializations/seed.sql", "original_file_path": "macros/materializations/seed.sql", "name": "bigquery__load_csv_rows", "macro_sql": "{% macro bigquery__load_csv_rows(model, agate_table) %}\n\n {%- set column_override = model['config'].get('column_types', {}) -%}\n {{ adapter.load_dataframe(model['database'], model['schema'], model['alias'],\n \t\t\t\t\t\t\tagate_table, column_override) }}\n {% if config.persist_relation_docs() and 'description' in model %}\n\n \t{{ adapter.update_table_description(model['database'], model['schema'], model['alias'], model['description']) }}\n {% endif %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.286588, "supported_languages": null}, "macro.dbt_bigquery.bigquery__handle_existing_table": {"unique_id": "macro.dbt_bigquery.bigquery__handle_existing_table", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/bigquery", "path": "macros/materializations/view.sql", "original_file_path": "macros/materializations/view.sql", "name": "bigquery__handle_existing_table", "macro_sql": "{% macro bigquery__handle_existing_table(full_refresh, old_relation) %}\n {%- if full_refresh -%}\n {{ adapter.drop_relation(old_relation) }}\n {%- else -%}\n {{ exceptions.relation_wrong_type(old_relation, 'view') }}\n {%- endif -%}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.287138, "supported_languages": null}, "macro.dbt_bigquery.materialization_view_bigquery": {"unique_id": "macro.dbt_bigquery.materialization_view_bigquery", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/bigquery", "path": "macros/materializations/view.sql", "original_file_path": "macros/materializations/view.sql", "name": "materialization_view_bigquery", "macro_sql": "{% materialization view, adapter='bigquery' -%}\n -- grab current tables grants config for comparision later on\n {% set grant_config = config.get('grants') %}\n\n {% set to_return = create_or_replace_view() %}\n\n {% set target_relation = this.incorporate(type='view') %}\n\n {% do persist_docs(target_relation, model) %}\n\n {% if config.get('grant_access_to') %}\n {% for grant_target_dict in config.get('grant_access_to') %}\n {% do adapter.grant_access_to(this, 'view', None, grant_target_dict) %}\n {% endfor %}\n {% endif %}\n\n {% do return(to_return) %}\n\n{%- endmaterialization %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.create_or_replace_view", "macro.dbt.persist_docs"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.2877262, "supported_languages": ["sql"]}, "macro.dbt_bigquery.materialization_table_bigquery": {"unique_id": "macro.dbt_bigquery.materialization_table_bigquery", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/bigquery", "path": "macros/materializations/table.sql", "original_file_path": "macros/materializations/table.sql", "name": "materialization_table_bigquery", "macro_sql": "{% materialization table, adapter='bigquery', supported_languages=['sql', 'python']-%}\n\n {%- set language = model['language'] -%}\n {%- set identifier = model['alias'] -%}\n {%- set old_relation = adapter.get_relation(database=database, schema=schema, identifier=identifier) -%}\n {%- set exists_not_as_table = (old_relation is not none and not old_relation.is_table) -%}\n {%- set target_relation = api.Relation.create(database=database, schema=schema, identifier=identifier, type='table') -%}\n\n -- grab current tables grants config for comparision later on\n {%- set grant_config = config.get('grants') -%}\n\n {{ run_hooks(pre_hooks) }}\n\n {#\n We only need to drop this thing if it is not a table.\n If it _is_ already a table, then we can overwrite it without downtime\n Unlike table -> view, no need for `--full-refresh`: dropping a view is no big deal\n #}\n {%- if exists_not_as_table -%}\n {{ adapter.drop_relation(old_relation) }}\n {%- endif -%}\n\n -- build model\n {%- set raw_partition_by = config.get('partition_by', none) -%}\n {%- set partition_by = adapter.parse_partition_by(raw_partition_by) -%}\n {%- set cluster_by = config.get('cluster_by', none) -%}\n {% if not adapter.is_replaceable(old_relation, partition_by, cluster_by) %}\n {% do log(\"Hard refreshing \" ~ old_relation ~ \" because it is not replaceable\") %}\n {% do adapter.drop_relation(old_relation) %}\n {% endif %}\n\n -- build model\n {%- call statement('main', language=language) -%}\n {{ create_table_as(False, target_relation, compiled_code, language) }}\n {%- endcall -%}\n\n {{ run_hooks(post_hooks) }}\n\n {% set should_revoke = should_revoke(old_relation, full_refresh_mode=True) %}\n {% do apply_grants(target_relation, grant_config, should_revoke) %}\n\n {% do persist_docs(target_relation, model) %}\n\n {{ return({'relations': [target_relation]}) }}\n\n{% endmaterialization %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.run_hooks", "macro.dbt.statement", "macro.dbt.create_table_as", "macro.dbt.should_revoke", "macro.dbt.apply_grants", "macro.dbt.persist_docs"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.291169, "supported_languages": ["sql", "python"]}, "macro.dbt_bigquery.py_write_table": {"unique_id": "macro.dbt_bigquery.py_write_table", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/bigquery", "path": "macros/materializations/table.sql", "original_file_path": "macros/materializations/table.sql", "name": "py_write_table", "macro_sql": "{% macro py_write_table(compiled_code, target_relation) %}\nfrom pyspark.sql import SparkSession\n\nspark = SparkSession.builder.appName('smallTest').getOrCreate()\n\nspark.conf.set(\"viewsEnabled\",\"true\")\nspark.conf.set(\"temporaryGcsBucket\",\"{{target.gcs_bucket}}\")\n\n{{ compiled_code }}\ndbt = dbtObj(spark.read.format(\"bigquery\").load)\ndf = model(dbt, spark)\n\n# COMMAND ----------\n# this is materialization code dbt generated, please do not modify\n\nimport pyspark\n# make sure pandas exists before using it\ntry:\n import pandas\n pandas_available = True\nexcept ImportError:\n pandas_available = False\n\n# make sure pyspark.pandas exists before using it\ntry:\n import pyspark.pandas\n pyspark_pandas_api_available = True\nexcept ImportError:\n pyspark_pandas_api_available = False\n\n# make sure databricks.koalas exists before using it\ntry:\n import databricks.koalas\n koalas_available = True\nexcept ImportError:\n koalas_available = False\n\n# preferentially convert pandas DataFrames to pandas-on-Spark or Koalas DataFrames first\n# since they know how to convert pandas DataFrames better than `spark.createDataFrame(df)`\n# and converting from pandas-on-Spark to Spark DataFrame has no overhead\nif pyspark_pandas_api_available and pandas_available and isinstance(df, pandas.core.frame.DataFrame):\n df = pyspark.pandas.frame.DataFrame(df)\nelif koalas_available and pandas_available and isinstance(df, pandas.core.frame.DataFrame):\n df = databricks.koalas.frame.DataFrame(df)\n\n# convert to pyspark.sql.dataframe.DataFrame\nif isinstance(df, pyspark.sql.dataframe.DataFrame):\n pass # since it is already a Spark DataFrame\nelif pyspark_pandas_api_available and isinstance(df, pyspark.pandas.frame.DataFrame):\n df = df.to_spark()\nelif koalas_available and isinstance(df, databricks.koalas.frame.DataFrame):\n df = df.to_spark()\nelif pandas_available and isinstance(df, pandas.core.frame.DataFrame):\n df = spark.createDataFrame(df)\nelse:\n msg = f\"{type(df)} is not a supported type for dbt Python materialization\"\n raise Exception(msg)\n\ndf.write \\\n .mode(\"overwrite\") \\\n .format(\"bigquery\") \\\n .option(\"writeMethod\", \"direct\").option(\"writeDisposition\", 'WRITE_TRUNCATE') \\\n .save(\"{{target_relation}}\")\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.291581, "supported_languages": null}, "macro.dbt_bigquery.materialization_copy_bigquery": {"unique_id": "macro.dbt_bigquery.materialization_copy_bigquery", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/bigquery", "path": "macros/materializations/copy.sql", "original_file_path": "macros/materializations/copy.sql", "name": "materialization_copy_bigquery", "macro_sql": "{% materialization copy, adapter='bigquery' -%}\n\n {# Setup #}\n {{ run_hooks(pre_hooks) }}\n\n {% set destination = this.incorporate(type='table') %}\n\n {# there can be several ref() or source() according to BQ copy API docs #}\n {# cycle over ref() and source() to create source tables array #}\n {% set source_array = [] %}\n {% for ref_table in model.refs %}\n {{ source_array.append(ref(*ref_table)) }}\n {% endfor %}\n\n {% for src_table in model.sources %}\n {{ source_array.append(source(*src_table)) }}\n {% endfor %}\n\n {# Call adapter copy_table function #}\n {%- set result_str = adapter.copy_table(\n source_array,\n destination,\n config.get('copy_materialization', default = 'table')) -%}\n\n {{ store_result('main', response=result_str) }}\n\n {# Clean up #}\n {{ run_hooks(post_hooks) }}\n {%- do apply_grants(target_relation, grant_config) -%}\n {{ adapter.commit() }}\n\n {{ return({'relations': [destination]}) }}\n{%- endmaterialization %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.run_hooks", "macro.dbt.apply_grants"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.292917, "supported_languages": ["sql"]}, "macro.dbt_bigquery.declare_dbt_max_partition": {"unique_id": "macro.dbt_bigquery.declare_dbt_max_partition", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/bigquery", "path": "macros/materializations/incremental.sql", "original_file_path": "macros/materializations/incremental.sql", "name": "declare_dbt_max_partition", "macro_sql": "{% macro declare_dbt_max_partition(relation, partition_by, complied_code, language='sql') %}\n\n {#-- TODO: revisit partitioning with python models --#}\n {%- if '_dbt_max_partition' in complied_code and language == 'sql' -%}\n\n declare _dbt_max_partition {{ partition_by.data_type }} default (\n select max({{ partition_by.field }}) from {{ this }}\n where {{ partition_by.field }} is not null\n );\n\n {%- endif -%}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.2951, "supported_languages": null}, "macro.dbt_bigquery.dbt_bigquery_validate_get_incremental_strategy": {"unique_id": "macro.dbt_bigquery.dbt_bigquery_validate_get_incremental_strategy", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/bigquery", "path": "macros/materializations/incremental.sql", "original_file_path": "macros/materializations/incremental.sql", "name": "dbt_bigquery_validate_get_incremental_strategy", "macro_sql": "{% macro dbt_bigquery_validate_get_incremental_strategy(config) %}\n {#-- Find and validate the incremental strategy #}\n {%- set strategy = config.get(\"incremental_strategy\") or 'merge' -%}\n\n {% set invalid_strategy_msg -%}\n Invalid incremental strategy provided: {{ strategy }}\n Expected one of: 'merge', 'insert_overwrite'\n {%- endset %}\n {% if strategy not in ['merge', 'insert_overwrite'] %}\n {% do exceptions.raise_compiler_error(invalid_strategy_msg) %}\n {% endif %}\n\n {% do return(strategy) %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.295496, "supported_languages": null}, "macro.dbt_bigquery.bq_insert_overwrite": {"unique_id": "macro.dbt_bigquery.bq_insert_overwrite", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/bigquery", "path": "macros/materializations/incremental.sql", "original_file_path": "macros/materializations/incremental.sql", "name": "bq_insert_overwrite", "macro_sql": "{% macro bq_insert_overwrite(\n tmp_relation, target_relation, sql, unique_key, partition_by, partitions, dest_columns, tmp_relation_exists\n) %}\n\n {% if partitions is not none and partitions != [] %} {# static #}\n\n {% set predicate -%}\n {{ partition_by.render(alias='DBT_INTERNAL_DEST') }} in (\n {{ partitions | join (', ') }}\n )\n {%- endset %}\n\n {%- set source_sql -%}\n (\n {{sql}}\n )\n {%- endset -%}\n\n {#-- Because we're putting the model SQL _directly_ into the MERGE statement,\n we need to prepend the MERGE statement with the user-configured sql_header,\n which may be needed to resolve that model SQL (e.g. referencing a variable or UDF in the header)\n in the \"dynamic\" case, we save the model SQL result as a temp table first, wherein the\n sql_header is included by the create_table_as macro.\n #}\n {{ get_insert_overwrite_merge_sql(target_relation, source_sql, dest_columns, [predicate], include_sql_header=true) }}\n\n {% else %} {# dynamic #}\n\n {% set predicate -%}\n {{ partition_by.render(alias='DBT_INTERNAL_DEST') }} in unnest(dbt_partitions_for_replacement)\n {%- endset %}\n\n {%- set source_sql -%}\n (\n select * from {{ tmp_relation }}\n )\n {%- endset -%}\n\n -- generated script to merge partitions into {{ target_relation }}\n declare dbt_partitions_for_replacement array<{{ partition_by.data_type }}>;\n\n {# have we already created the temp table to check for schema changes? #}\n {% if not tmp_relation_exists %}\n {{ declare_dbt_max_partition(this, partition_by, sql) }}\n\n -- 1. create a temp table\n {{ create_table_as(True, tmp_relation, compiled_code) }}\n {% else %}\n -- 1. temp table already exists, we used it to check for schema changes\n {% endif %}\n\n -- 2. define partitions to update\n set (dbt_partitions_for_replacement) = (\n select as struct\n array_agg(distinct {{ partition_by.render() }})\n from {{ tmp_relation }}\n );\n\n -- 3. run the merge statement\n {{ get_insert_overwrite_merge_sql(target_relation, source_sql, dest_columns, [predicate]) }};\n\n -- 4. clean up the temp table\n drop table if exists {{ tmp_relation }}\n\n {% endif %}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.get_insert_overwrite_merge_sql", "macro.dbt_bigquery.declare_dbt_max_partition", "macro.dbt.create_table_as"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.296596, "supported_languages": null}, "macro.dbt_bigquery.bq_generate_incremental_build_sql": {"unique_id": "macro.dbt_bigquery.bq_generate_incremental_build_sql", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/bigquery", "path": "macros/materializations/incremental.sql", "original_file_path": "macros/materializations/incremental.sql", "name": "bq_generate_incremental_build_sql", "macro_sql": "{% macro bq_generate_incremental_build_sql(\n strategy, tmp_relation, target_relation, sql, unique_key, partition_by, partitions, dest_columns, tmp_relation_exists\n) %}\n {#-- if partitioned, use BQ scripting to get the range of partition values to be updated --#}\n {% if strategy == 'insert_overwrite' %}\n\n {% set missing_partition_msg -%}\n The 'insert_overwrite' strategy requires the `partition_by` config.\n {%- endset %}\n {% if partition_by is none %}\n {% do exceptions.raise_compiler_error(missing_partition_msg) %}\n {% endif %}\n\n {% set build_sql = bq_insert_overwrite(\n tmp_relation, target_relation, sql, unique_key, partition_by, partitions, dest_columns, tmp_relation_exists\n ) %}\n\n {% else %} {# strategy == 'merge' #}\n {%- set source_sql -%}\n {%- if tmp_relation_exists -%}\n (\n select * from {{ tmp_relation }}\n )\n {%- else -%} {#-- wrap sql in parens to make it a subquery --#}\n (\n {{sql}}\n )\n {%- endif -%}\n {%- endset -%}\n\n {% set build_sql = get_merge_sql(target_relation, source_sql, unique_key, dest_columns) %}\n\n {% endif %}\n\n {{ return(build_sql) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_bigquery.bq_insert_overwrite", "macro.dbt.get_merge_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.297357, "supported_languages": null}, "macro.dbt_bigquery.materialization_incremental_bigquery": {"unique_id": "macro.dbt_bigquery.materialization_incremental_bigquery", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/bigquery", "path": "macros/materializations/incremental.sql", "original_file_path": "macros/materializations/incremental.sql", "name": "materialization_incremental_bigquery", "macro_sql": "{% materialization incremental, adapter='bigquery', supported_languages=['sql', 'python'] -%}\n\n {%- set unique_key = config.get('unique_key') -%}\n {%- set full_refresh_mode = (should_full_refresh()) -%}\n {%- set language = model['language'] %}\n\n {%- set target_relation = this %}\n {%- set existing_relation = load_relation(this) %}\n {%- set tmp_relation = make_temp_relation(this) %}\n\n {#-- Validate early so we don't run SQL if the strategy is invalid --#}\n {% set strategy = dbt_bigquery_validate_get_incremental_strategy(config) -%}\n\n {%- set raw_partition_by = config.get('partition_by', none) -%}\n {%- set partition_by = adapter.parse_partition_by(raw_partition_by) -%}\n {%- set partitions = config.get('partitions', none) -%}\n {%- set cluster_by = config.get('cluster_by', none) -%}\n\n {% set on_schema_change = incremental_validate_on_schema_change(config.get('on_schema_change'), default='ignore') %}\n\n -- grab current tables grants config for comparision later on\n {% set grant_config = config.get('grants') %}\n\n {{ run_hooks(pre_hooks) }}\n\n {% if existing_relation is none %}\n {%- call statement('main', language=language) -%}\n {{ create_table_as(False, target_relation, compiled_code, language) }}\n {%- endcall -%}\n\n {% elif existing_relation.is_view %}\n {#-- There's no way to atomically replace a view with a table on BQ --#}\n {{ adapter.drop_relation(existing_relation) }}\n {%- call statement('main', language=language) -%}\n {{ create_table_as(False, target_relation, compiled_code, language) }}\n {%- endcall -%}\n\n {% elif full_refresh_mode %}\n {#-- If the partition/cluster config has changed, then we must drop and recreate --#}\n {% if not adapter.is_replaceable(existing_relation, partition_by, cluster_by) %}\n {% do log(\"Hard refreshing \" ~ existing_relation ~ \" because it is not replaceable\") %}\n {{ adapter.drop_relation(existing_relation) }}\n {% endif %}\n {%- call statement('main', language=language) -%}\n {{ create_table_as(False, target_relation, compiled_code, language) }}\n {%- endcall -%}\n\n {% else %}\n {%- if language == 'python' and strategy == 'insert_overwrite' -%}\n {#-- This lets us move forward assuming no python will be directly templated into a query --#}\n {%- set python_unsupported_msg -%}\n The 'insert_overwrite' strategy is not yet supported for python models.\n {%- endset %}\n {% do exceptions.raise_compiler_error(python_unsupported_msg) %}\n {%- endif -%}\n\n {% set tmp_relation_exists = false %}\n {% if on_schema_change != 'ignore' or language == 'python' %}\n {#-- Check first, since otherwise we may not build a temp table --#}\n {#-- Python always needs to create a temp table --#}\n {%- call statement('create_tmp_relation', language=language) -%}\n {{ declare_dbt_max_partition(this, partition_by, compiled_code, language) +\n create_table_as(True, tmp_relation, compiled_code, language)\n }}\n {%- endcall -%}\n {% set tmp_relation_exists = true %}\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, tmp_relation, existing_relation) %}\n {% endif %}\n\n {% if not dest_columns %}\n {% set dest_columns = adapter.get_columns_in_relation(existing_relation) %}\n {% endif %}\n {% set build_sql = bq_generate_incremental_build_sql(\n strategy, tmp_relation, target_relation, compiled_code, unique_key, partition_by, partitions, dest_columns, tmp_relation_exists\n ) %}\n\n {%- call statement('main') -%}\n {{ build_sql }}\n {% endcall %}\n\n {%- if language == 'python' and tmp_relation -%}\n {{ adapter.drop_relation(tmp_relation) }}\n {%- endif -%}\n\n {% endif %}\n\n {{ run_hooks(post_hooks) }}\n\n {% set target_relation = this.incorporate(type='table') %}\n\n {% set should_revoke = should_revoke(existing_relation, full_refresh_mode) %}\n {% do apply_grants(target_relation, grant_config, should_revoke) %}\n\n {% do persist_docs(target_relation, model) %}\n\n {{ return({'relations': [target_relation]}) }}\n\n{%- endmaterialization %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.should_full_refresh", "macro.dbt.load_relation", "macro.dbt.make_temp_relation", "macro.dbt_bigquery.dbt_bigquery_validate_get_incremental_strategy", "macro.dbt.incremental_validate_on_schema_change", "macro.dbt.run_hooks", "macro.dbt.statement", "macro.dbt.create_table_as", "macro.dbt_bigquery.declare_dbt_max_partition", "macro.dbt.process_schema_changes", "macro.dbt_bigquery.bq_generate_incremental_build_sql", "macro.dbt.should_revoke", "macro.dbt.apply_grants", "macro.dbt.persist_docs"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.300479, "supported_languages": ["sql", "python"]}, "macro.dbt_bigquery.bigquery__snapshot_hash_arguments": {"unique_id": "macro.dbt_bigquery.bigquery__snapshot_hash_arguments", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/bigquery", "path": "macros/materializations/snapshot.sql", "original_file_path": "macros/materializations/snapshot.sql", "name": "bigquery__snapshot_hash_arguments", "macro_sql": "{% macro bigquery__snapshot_hash_arguments(args) -%}\n to_hex(md5(concat({%- for arg in args -%}\n coalesce(cast({{ arg }} as string), ''){% if not loop.last %}, '|',{% endif -%}\n {%- endfor -%}\n )))\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.3009222, "supported_languages": null}, "macro.dbt_bigquery.bigquery__create_columns": {"unique_id": "macro.dbt_bigquery.bigquery__create_columns", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/bigquery", "path": "macros/materializations/snapshot.sql", "original_file_path": "macros/materializations/snapshot.sql", "name": "bigquery__create_columns", "macro_sql": "{% macro bigquery__create_columns(relation, columns) %}\n {{ adapter.alter_table_add_columns(relation, columns) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.3010628, "supported_languages": null}, "macro.dbt_bigquery.bigquery__post_snapshot": {"unique_id": "macro.dbt_bigquery.bigquery__post_snapshot", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/bigquery", "path": "macros/materializations/snapshot.sql", "original_file_path": "macros/materializations/snapshot.sql", "name": "bigquery__post_snapshot", "macro_sql": "{% macro bigquery__post_snapshot(staging_relation) %}\n -- Clean up the snapshot temp table\n {% do drop_relation(staging_relation) %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.drop_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.301179, "supported_languages": null}, "macro.dbt_bigquery.bigquery__except": {"unique_id": "macro.dbt_bigquery.bigquery__except", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/bigquery", "path": "macros/utils/except.sql", "original_file_path": "macros/utils/except.sql", "name": "bigquery__except", "macro_sql": "{% macro bigquery__except() %}\n\n except distinct\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.301337, "supported_languages": null}, "macro.dbt_bigquery.bigquery__dateadd": {"unique_id": "macro.dbt_bigquery.bigquery__dateadd", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/bigquery", "path": "macros/utils/dateadd.sql", "original_file_path": "macros/utils/dateadd.sql", "name": "bigquery__dateadd", "macro_sql": "{% macro bigquery__dateadd(datepart, interval, from_date_or_timestamp) %}\n\n datetime_add(\n cast( {{ from_date_or_timestamp }} as datetime),\n interval {{ interval }} {{ datepart }}\n )\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.301593, "supported_languages": null}, "macro.dbt_bigquery.bigquery__current_timestamp": {"unique_id": "macro.dbt_bigquery.bigquery__current_timestamp", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/bigquery", "path": "macros/utils/timestamps.sql", "original_file_path": "macros/utils/timestamps.sql", "name": "bigquery__current_timestamp", "macro_sql": "{% macro bigquery__current_timestamp() -%}\n current_timestamp()\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.301794, "supported_languages": null}, "macro.dbt_bigquery.bigquery__snapshot_string_as_time": {"unique_id": "macro.dbt_bigquery.bigquery__snapshot_string_as_time", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/bigquery", "path": "macros/utils/timestamps.sql", "original_file_path": "macros/utils/timestamps.sql", "name": "bigquery__snapshot_string_as_time", "macro_sql": "{% macro bigquery__snapshot_string_as_time(timestamp) -%}\n {%- set result = 'TIMESTAMP(\"' ~ timestamp ~ '\")' -%}\n {{ return(result) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.30195, "supported_languages": null}, "macro.dbt_bigquery.bigquery__current_timestamp_backcompat": {"unique_id": "macro.dbt_bigquery.bigquery__current_timestamp_backcompat", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/bigquery", "path": "macros/utils/timestamps.sql", "original_file_path": "macros/utils/timestamps.sql", "name": "bigquery__current_timestamp_backcompat", "macro_sql": "{% macro bigquery__current_timestamp_backcompat() -%}\n current_timestamp\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.30202, "supported_languages": null}, "macro.dbt_bigquery.bigquery__intersect": {"unique_id": "macro.dbt_bigquery.bigquery__intersect", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/bigquery", "path": "macros/utils/intersect.sql", "original_file_path": "macros/utils/intersect.sql", "name": "bigquery__intersect", "macro_sql": "{% macro bigquery__intersect() %}\n\n intersect distinct\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.302169, "supported_languages": null}, "macro.dbt_bigquery.bigquery__escape_single_quotes": {"unique_id": "macro.dbt_bigquery.bigquery__escape_single_quotes", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/bigquery", "path": "macros/utils/escape_single_quotes.sql", "original_file_path": "macros/utils/escape_single_quotes.sql", "name": "bigquery__escape_single_quotes", "macro_sql": "{% macro bigquery__escape_single_quotes(expression) -%}\n{{ expression | replace(\"'\", \"\\\\'\") }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.302402, "supported_languages": null}, "macro.dbt_bigquery.bigquery__right": {"unique_id": "macro.dbt_bigquery.bigquery__right", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/bigquery", "path": "macros/utils/right.sql", "original_file_path": "macros/utils/right.sql", "name": "bigquery__right", "macro_sql": "{% macro bigquery__right(string_text, length_expression) %}\n\n case when {{ length_expression }} = 0\n then ''\n else\n substr(\n {{ string_text }},\n -1 * ({{ length_expression }})\n )\n end\n\n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.30266, "supported_languages": null}, "macro.dbt_bigquery.bigquery__listagg": {"unique_id": "macro.dbt_bigquery.bigquery__listagg", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/bigquery", "path": "macros/utils/listagg.sql", "original_file_path": "macros/utils/listagg.sql", "name": "bigquery__listagg", "macro_sql": "{% macro bigquery__listagg(measure, delimiter_text, order_by_clause, limit_num) -%}\n\n string_agg(\n {{ measure }},\n {{ delimiter_text }}\n {% if order_by_clause -%}\n {{ order_by_clause }}\n {%- endif %}\n {% if limit_num -%}\n limit {{ limit_num }}\n {%- endif %}\n )\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.303055, "supported_languages": null}, "macro.dbt_bigquery.bigquery__datediff": {"unique_id": "macro.dbt_bigquery.bigquery__datediff", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/bigquery", "path": "macros/utils/datediff.sql", "original_file_path": "macros/utils/datediff.sql", "name": "bigquery__datediff", "macro_sql": "{% macro bigquery__datediff(first_date, second_date, datepart) -%}\n\n {% if dbt_version[0] == 1 and dbt_version[2] >= 2 %}\n {{ return(dbt.datediff(first_date, second_date, datepart)) }}\n {% else %}\n\n datetime_diff(\n cast({{second_date}} as datetime),\n cast({{first_date}} as datetime),\n {{datepart}}\n )\n\n {% endif %}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.datediff"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.3035479, "supported_languages": null}, "macro.dbt_bigquery.bigquery__safe_cast": {"unique_id": "macro.dbt_bigquery.bigquery__safe_cast", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/bigquery", "path": "macros/utils/safe_cast.sql", "original_file_path": "macros/utils/safe_cast.sql", "name": "bigquery__safe_cast", "macro_sql": "{% macro bigquery__safe_cast(field, type) %}\n safe_cast({{field}} as {{type}})\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.303763, "supported_languages": null}, "macro.dbt_bigquery.bigquery__hash": {"unique_id": "macro.dbt_bigquery.bigquery__hash", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/bigquery", "path": "macros/utils/hash.sql", "original_file_path": "macros/utils/hash.sql", "name": "bigquery__hash", "macro_sql": "{% macro bigquery__hash(field) -%}\n to_hex({{dbt.default__hash(field)}})\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__hash"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.3039842, "supported_languages": null}, "macro.dbt_bigquery.bigquery__position": {"unique_id": "macro.dbt_bigquery.bigquery__position", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/bigquery", "path": "macros/utils/position.sql", "original_file_path": "macros/utils/position.sql", "name": "bigquery__position", "macro_sql": "{% macro bigquery__position(substring_text, string_text) %}\n\n strpos(\n {{ string_text }},\n {{ substring_text }}\n\n )\n\n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.30421, "supported_languages": null}, "macro.dbt_bigquery.bigquery__array_concat": {"unique_id": "macro.dbt_bigquery.bigquery__array_concat", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/bigquery", "path": "macros/utils/array_concat.sql", "original_file_path": "macros/utils/array_concat.sql", "name": "bigquery__array_concat", "macro_sql": "{% macro bigquery__array_concat(array_1, array_2) -%}\n array_concat({{ array_1 }}, {{ array_2 }})\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.304408, "supported_languages": null}, "macro.dbt_bigquery.bigquery__bool_or": {"unique_id": "macro.dbt_bigquery.bigquery__bool_or", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/bigquery", "path": "macros/utils/bool_or.sql", "original_file_path": "macros/utils/bool_or.sql", "name": "bigquery__bool_or", "macro_sql": "{% macro bigquery__bool_or(expression) -%}\n\n logical_or({{ expression }})\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.304584, "supported_languages": null}, "macro.dbt_bigquery.bigquery__split_part": {"unique_id": "macro.dbt_bigquery.bigquery__split_part", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/bigquery", "path": "macros/utils/split_part.sql", "original_file_path": "macros/utils/split_part.sql", "name": "bigquery__split_part", "macro_sql": "{% macro bigquery__split_part(string_text, delimiter_text, part_number) %}\n\n {% if part_number >= 0 %}\n split(\n {{ string_text }},\n {{ delimiter_text }}\n )[safe_offset({{ part_number - 1 }})]\n {% else %}\n split(\n {{ string_text }},\n {{ delimiter_text }}\n )[safe_offset(\n length({{ string_text }})\n - length(\n replace({{ string_text }}, {{ delimiter_text }}, '')\n ) + 1\n )]\n {% endif %}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.305231, "supported_languages": null}, "macro.dbt_bigquery.bigquery__date_trunc": {"unique_id": "macro.dbt_bigquery.bigquery__date_trunc", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/bigquery", "path": "macros/utils/date_trunc.sql", "original_file_path": "macros/utils/date_trunc.sql", "name": "bigquery__date_trunc", "macro_sql": "{% macro bigquery__date_trunc(datepart, date) -%}\n timestamp_trunc(\n cast({{date}} as timestamp),\n {{datepart}}\n )\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.3054469, "supported_languages": null}, "macro.dbt_bigquery.bigquery__array_construct": {"unique_id": "macro.dbt_bigquery.bigquery__array_construct", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/bigquery", "path": "macros/utils/array_construct.sql", "original_file_path": "macros/utils/array_construct.sql", "name": "bigquery__array_construct", "macro_sql": "{% macro bigquery__array_construct(inputs, data_type) -%}\n {% if inputs|length > 0 %}\n [ {{ inputs|join(' , ') }} ]\n {% else %}\n ARRAY<{{data_type}}>[]\n {% endif %}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.3057659, "supported_languages": null}, "macro.dbt_bigquery.bigquery__array_append": {"unique_id": "macro.dbt_bigquery.bigquery__array_append", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/bigquery", "path": "macros/utils/array_append.sql", "original_file_path": "macros/utils/array_append.sql", "name": "bigquery__array_append", "macro_sql": "{% macro bigquery__array_append(array, new_element) -%}\n {{ array_concat(array, array_construct([new_element])) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.array_concat", "macro.dbt.array_construct"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.3060029, "supported_languages": null}, "macro.dbt_bigquery.bigquery__get_show_grant_sql": {"unique_id": "macro.dbt_bigquery.bigquery__get_show_grant_sql", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/bigquery", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "name": "bigquery__get_show_grant_sql", "macro_sql": "{% macro bigquery__get_show_grant_sql(relation) %}\n {% set location = adapter.get_dataset_location(relation) %}\n {% set relation = relation.incorporate(location=location) %}\n\n select privilege_type, grantee\n from {{ relation.information_schema(\"OBJECT_PRIVILEGES\") }}\n where object_schema = \"{{ relation.dataset }}\"\n and object_name = \"{{ relation.identifier }}\"\n -- filter out current user\n and split(grantee, ':')[offset(1)] != session_user()\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.306623, "supported_languages": null}, "macro.dbt_bigquery.bigquery__get_grant_sql": {"unique_id": "macro.dbt_bigquery.bigquery__get_grant_sql", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/bigquery", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "name": "bigquery__get_grant_sql", "macro_sql": "\n\n\n{%- macro bigquery__get_grant_sql(relation, privilege, grantee) -%}\n grant `{{ privilege }}` on {{ relation.type }} {{ relation }} to {{ '\\\"' + grantee|join('\\\", \\\"') + '\\\"' }}\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.306838, "supported_languages": null}, "macro.dbt_bigquery.bigquery__get_revoke_sql": {"unique_id": "macro.dbt_bigquery.bigquery__get_revoke_sql", "package_name": "dbt_bigquery", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/bigquery", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "name": "bigquery__get_revoke_sql", "macro_sql": "{%- macro bigquery__get_revoke_sql(relation, privilege, grantee) -%}\n revoke `{{ privilege }}` on {{ relation.type }} {{ relation }} from {{ '\\\"' + grantee|join('\\\", \\\"') + '\\\"' }}\n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.307046, "supported_languages": null}, "macro.dbt.run_hooks": {"unique_id": "macro.dbt.run_hooks", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/hooks.sql", "original_file_path": "macros/materializations/hooks.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.308046, "supported_languages": null}, "macro.dbt.make_hook_config": {"unique_id": "macro.dbt.make_hook_config", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/hooks.sql", "original_file_path": "macros/materializations/hooks.sql", "name": "make_hook_config", "macro_sql": "{% macro make_hook_config(sql, inside_transaction) %}\n {{ tojson({\"sql\": sql, \"transaction\": inside_transaction}) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.308219, "supported_languages": null}, "macro.dbt.before_begin": {"unique_id": "macro.dbt.before_begin", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/hooks.sql", "original_file_path": "macros/materializations/hooks.sql", "name": "before_begin", "macro_sql": "{% macro before_begin(sql) %}\n {{ make_hook_config(sql, inside_transaction=False) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.make_hook_config"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.308346, "supported_languages": null}, "macro.dbt.in_transaction": {"unique_id": "macro.dbt.in_transaction", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/hooks.sql", "original_file_path": "macros/materializations/hooks.sql", "name": "in_transaction", "macro_sql": "{% macro in_transaction(sql) %}\n {{ make_hook_config(sql, inside_transaction=True) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.make_hook_config"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.308473, "supported_languages": null}, "macro.dbt.after_commit": {"unique_id": "macro.dbt.after_commit", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/hooks.sql", "original_file_path": "macros/materializations/hooks.sql", "name": "after_commit", "macro_sql": "{% macro after_commit(sql) %}\n {{ make_hook_config(sql, inside_transaction=False) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.make_hook_config"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.308596, "supported_languages": null}, "macro.dbt.set_sql_header": {"unique_id": "macro.dbt.set_sql_header", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/configs.sql", "original_file_path": "macros/materializations/configs.sql", "name": "set_sql_header", "macro_sql": "{% macro set_sql_header(config) -%}\n {{ config.set('sql_header', caller()) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.308977, "supported_languages": null}, "macro.dbt.should_full_refresh": {"unique_id": "macro.dbt.should_full_refresh", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/configs.sql", "original_file_path": "macros/materializations/configs.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.30924, "supported_languages": null}, "macro.dbt.should_store_failures": {"unique_id": "macro.dbt.should_store_failures", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/configs.sql", "original_file_path": "macros/materializations/configs.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.3094988, "supported_languages": null}, "macro.dbt.snapshot_merge_sql": {"unique_id": "macro.dbt.snapshot_merge_sql", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/snapshot_merge.sql", "original_file_path": "macros/materializations/snapshots/snapshot_merge.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__snapshot_merge_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.309938, "supported_languages": null}, "macro.dbt.default__snapshot_merge_sql": {"unique_id": "macro.dbt.default__snapshot_merge_sql", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/snapshot_merge.sql", "original_file_path": "macros/materializations/snapshots/snapshot_merge.sql", "name": "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 merge into {{ target }} as DBT_INTERNAL_DEST\n using {{ source }} as DBT_INTERNAL_SOURCE\n on DBT_INTERNAL_SOURCE.dbt_scd_id = DBT_INTERNAL_DEST.dbt_scd_id\n\n when matched\n and DBT_INTERNAL_DEST.dbt_valid_to is null\n and DBT_INTERNAL_SOURCE.dbt_change_type in ('update', 'delete')\n then update\n set dbt_valid_to = DBT_INTERNAL_SOURCE.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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.310179, "supported_languages": null}, "macro.dbt.strategy_dispatch": {"unique_id": "macro.dbt.strategy_dispatch", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.3132741, "supported_languages": null}, "macro.dbt.snapshot_hash_arguments": {"unique_id": "macro.dbt.snapshot_hash_arguments", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "name": "snapshot_hash_arguments", "macro_sql": "{% macro snapshot_hash_arguments(args) -%}\n {{ adapter.dispatch('snapshot_hash_arguments', 'dbt')(args) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_bigquery.bigquery__snapshot_hash_arguments"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.3134248, "supported_languages": null}, "macro.dbt.default__snapshot_hash_arguments": {"unique_id": "macro.dbt.default__snapshot_hash_arguments", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.3136199, "supported_languages": null}, "macro.dbt.snapshot_timestamp_strategy": {"unique_id": "macro.dbt.snapshot_timestamp_strategy", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "name": "snapshot_timestamp_strategy", "macro_sql": "{% macro snapshot_timestamp_strategy(node, snapshotted_rel, current_rel, config, target_exists) %}\n {% set primary_key = config['unique_key'] %}\n {% set updated_at = config['updated_at'] %}\n {% set invalidate_hard_deletes = config.get('invalidate_hard_deletes', false) %}\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 }}.dbt_valid_from < {{ current_rel }}.{{ updated_at }})\n {%- endset %}\n\n {% set scd_id_expr = snapshot_hash_arguments([primary_key, updated_at]) %}\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 }) %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.snapshot_hash_arguments"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.314261, "supported_languages": null}, "macro.dbt.snapshot_string_as_time": {"unique_id": "macro.dbt.snapshot_string_as_time", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "name": "snapshot_string_as_time", "macro_sql": "{% macro snapshot_string_as_time(timestamp) -%}\n {{ adapter.dispatch('snapshot_string_as_time', 'dbt')(timestamp) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_bigquery.bigquery__snapshot_string_as_time"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.3144078, "supported_languages": null}, "macro.dbt.default__snapshot_string_as_time": {"unique_id": "macro.dbt.default__snapshot_string_as_time", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.314559, "supported_languages": null}, "macro.dbt.snapshot_check_all_get_existing_columns": {"unique_id": "macro.dbt.snapshot_check_all_get_existing_columns", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "name": "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 select {{ check_cols_config | join(', ') }} from ({{ node['compiled_code'] }}) 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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.get_columns_in_query"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.315794, "supported_languages": null}, "macro.dbt.snapshot_check_strategy": {"unique_id": "macro.dbt.snapshot_check_strategy", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "name": "snapshot_check_strategy", "macro_sql": "{% macro snapshot_check_strategy(node, snapshotted_rel, current_rel, config, target_exists) %}\n {% set check_cols_config = config['check_cols'] %}\n {% set primary_key = config['unique_key'] %}\n {% set invalidate_hard_deletes = config.get('invalidate_hard_deletes', false) %}\n {% set updated_at = config.get('updated_at', 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_id_expr = snapshot_hash_arguments([primary_key, updated_at]) %}\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 }) %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "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}, "patch_path": null, "arguments": [], "created_at": 1666728757.3170009, "supported_languages": null}, "macro.dbt.create_columns": {"unique_id": "macro.dbt.create_columns", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "name": "create_columns", "macro_sql": "{% macro create_columns(relation, columns) %}\n {{ adapter.dispatch('create_columns', 'dbt')(relation, columns) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_bigquery.bigquery__create_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.3204129, "supported_languages": null}, "macro.dbt.default__create_columns": {"unique_id": "macro.dbt.default__create_columns", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "name": "default__create_columns", "macro_sql": "{% macro default__create_columns(relation, columns) %}\n {% for column in columns %}\n {% call statement() %}\n alter table {{ relation }} add column \"{{ column.name }}\" {{ column.data_type }};\n {% endcall %}\n {% endfor %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.3206668, "supported_languages": null}, "macro.dbt.post_snapshot": {"unique_id": "macro.dbt.post_snapshot", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "name": "post_snapshot", "macro_sql": "{% macro post_snapshot(staging_relation) %}\n {{ adapter.dispatch('post_snapshot', 'dbt')(staging_relation) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_bigquery.bigquery__post_snapshot"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.320819, "supported_languages": null}, "macro.dbt.default__post_snapshot": {"unique_id": "macro.dbt.default__post_snapshot", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "name": "default__post_snapshot", "macro_sql": "{% macro default__post_snapshot(staging_relation) %}\n {# no-op #}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.3209012, "supported_languages": null}, "macro.dbt.get_true_sql": {"unique_id": "macro.dbt.get_true_sql", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "name": "get_true_sql", "macro_sql": "{% macro get_true_sql() %}\n {{ adapter.dispatch('get_true_sql', 'dbt')() }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__get_true_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.321032, "supported_languages": null}, "macro.dbt.default__get_true_sql": {"unique_id": "macro.dbt.default__get_true_sql", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "name": "default__get_true_sql", "macro_sql": "{% macro default__get_true_sql() %}\n {{ return('TRUE') }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.3211362, "supported_languages": null}, "macro.dbt.snapshot_staging_table": {"unique_id": "macro.dbt.snapshot_staging_table", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__snapshot_staging_table"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.321325, "supported_languages": null}, "macro.dbt.default__snapshot_staging_table": {"unique_id": "macro.dbt.default__snapshot_staging_table", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "name": "default__snapshot_staging_table", "macro_sql": "{% macro default__snapshot_staging_table(strategy, source_sql, target_relation) -%}\n\n with snapshot_query as (\n\n {{ source_sql }}\n\n ),\n\n snapshotted_data as (\n\n select *,\n {{ strategy.unique_key }} as dbt_unique_key\n\n from {{ target_relation }}\n where dbt_valid_to is null\n\n ),\n\n insertions_source_data as (\n\n select\n *,\n {{ strategy.unique_key }} as dbt_unique_key,\n {{ strategy.updated_at }} as dbt_updated_at,\n {{ strategy.updated_at }} as dbt_valid_from,\n nullif({{ strategy.updated_at }}, {{ strategy.updated_at }}) as dbt_valid_to,\n {{ strategy.scd_id }} as dbt_scd_id\n\n from snapshot_query\n ),\n\n updates_source_data as (\n\n select\n *,\n {{ strategy.unique_key }} as dbt_unique_key,\n {{ strategy.updated_at }} as dbt_updated_at,\n {{ strategy.updated_at }} as dbt_valid_from,\n {{ strategy.updated_at }} as dbt_valid_to\n\n from snapshot_query\n ),\n\n {%- if strategy.invalidate_hard_deletes %}\n\n deletes_source_data as (\n\n select\n *,\n {{ strategy.unique_key }} as dbt_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\n from insertions_source_data as source_data\n left outer join snapshotted_data on snapshotted_data.dbt_unique_key = source_data.dbt_unique_key\n where snapshotted_data.dbt_unique_key is null\n or (\n snapshotted_data.dbt_unique_key is not null\n and (\n {{ strategy.row_changed }}\n )\n )\n\n ),\n\n updates as (\n\n select\n 'update' as dbt_change_type,\n source_data.*,\n snapshotted_data.dbt_scd_id\n\n from updates_source_data as source_data\n join snapshotted_data on snapshotted_data.dbt_unique_key = source_data.dbt_unique_key\n where (\n {{ strategy.row_changed }}\n )\n )\n\n {%- if strategy.invalidate_hard_deletes -%}\n ,\n\n deletes as (\n\n select\n 'delete' as dbt_change_type,\n source_data.*,\n {{ snapshot_get_time() }} as dbt_valid_from,\n {{ snapshot_get_time() }} as dbt_updated_at,\n {{ snapshot_get_time() }} as dbt_valid_to,\n snapshotted_data.dbt_scd_id\n\n from snapshotted_data\n left join deletes_source_data as source_data on snapshotted_data.dbt_unique_key = source_data.dbt_unique_key\n where source_data.dbt_unique_key is null\n )\n {%- endif %}\n\n select * from insertions\n union all\n select * from updates\n {%- if strategy.invalidate_hard_deletes %}\n union all\n select * from deletes\n {%- endif %}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.snapshot_get_time"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.322121, "supported_languages": null}, "macro.dbt.build_snapshot_table": {"unique_id": "macro.dbt.build_snapshot_table", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "name": "build_snapshot_table", "macro_sql": "{% macro build_snapshot_table(strategy, sql) -%}\n {{ adapter.dispatch('build_snapshot_table', 'dbt')(strategy, sql) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__build_snapshot_table"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.322303, "supported_languages": null}, "macro.dbt.default__build_snapshot_table": {"unique_id": "macro.dbt.default__build_snapshot_table", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "name": "default__build_snapshot_table", "macro_sql": "{% macro default__build_snapshot_table(strategy, sql) %}\n\n select *,\n {{ strategy.scd_id }} as dbt_scd_id,\n {{ strategy.updated_at }} as dbt_updated_at,\n {{ strategy.updated_at }} as dbt_valid_from,\n nullif({{ strategy.updated_at }}, {{ strategy.updated_at }}) as dbt_valid_to\n from (\n {{ sql }}\n ) sbq\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.322531, "supported_languages": null}, "macro.dbt.build_snapshot_staging_table": {"unique_id": "macro.dbt.build_snapshot_staging_table", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "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}, "patch_path": null, "arguments": [], "created_at": 1666728757.322923, "supported_languages": null}, "macro.dbt.materialization_snapshot_default": {"unique_id": "macro.dbt.materialization_snapshot_default", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/snapshot.sql", "original_file_path": "macros/materializations/snapshots/snapshot.sql", "name": "materialization_snapshot_default", "macro_sql": "{% materialization snapshot, default %}\n {%- set config = model['config'] -%}\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 {% set strategy = strategy_macro(model, \"snapshotted_data\", \"source_data\", 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 final_sql = create_table_as(False, target_relation, build_sql) %}\n\n {% else %}\n\n {{ adapter.valid_snapshot_target(target_relation) }}\n\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 missing_columns = adapter.get_missing_columns(staging_table, target_relation)\n | rejectattr('name', 'equalto', 'dbt_change_type')\n | rejectattr('name', 'equalto', 'DBT_CHANGE_TYPE')\n | rejectattr('name', 'equalto', 'dbt_unique_key')\n | rejectattr('name', 'equalto', 'DBT_UNIQUE_KEY')\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', 'equalto', 'dbt_change_type')\n | rejectattr('name', 'equalto', 'DBT_CHANGE_TYPE')\n | rejectattr('name', 'equalto', 'dbt_unique_key')\n | rejectattr('name', 'equalto', 'DBT_UNIQUE_KEY')\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 {% 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 %}", "resource_type": "macro", "tags": [], "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.build_snapshot_staging_table", "macro.dbt.create_columns", "macro.dbt.snapshot_merge_sql", "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}, "patch_path": null, "arguments": [], "created_at": 1666728757.328597, "supported_languages": ["sql"]}, "macro.dbt.materialization_test_default": {"unique_id": "macro.dbt.materialization_test_default", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/tests/test.sql", "original_file_path": "macros/materializations/tests/test.sql", "name": "materialization_test_default", "macro_sql": "{%- materialization test, default -%}\n\n {% set relations = [] %}\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 {% set target_relation = api.Relation.create(\n identifier=identifier, schema=schema, database=database, type='table') -%} %}\n\n {% if old_relation %}\n {% do adapter.drop_relation(old_relation) %}\n {% endif %}\n\n {% call statement(auto_begin=True) %}\n {{ create_table_as(False, target_relation, sql) }}\n {% endcall %}\n\n {% do relations.append(target_relation) %}\n\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 %}\n\n {% endif %}\n\n {% set limit = config.get('limit') %}\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 {{ get_test_sql(main_sql, fail_calc, warn_if, error_if, limit)}}\n\n {%- endcall %}\n\n {{ return({'relations': relations}) }}\n\n{%- endmaterialization -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.should_store_failures", "macro.dbt.statement", "macro.dbt.create_table_as", "macro.dbt.get_test_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.3305972, "supported_languages": ["sql"]}, "macro.dbt.get_test_sql": {"unique_id": "macro.dbt.get_test_sql", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/tests/helpers.sql", "original_file_path": "macros/materializations/tests/helpers.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__get_test_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.331091, "supported_languages": null}, "macro.dbt.default__get_test_sql": {"unique_id": "macro.dbt.default__get_test_sql", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/tests/helpers.sql", "original_file_path": "macros/materializations/tests/helpers.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.331363, "supported_languages": null}, "macro.dbt.get_where_subquery": {"unique_id": "macro.dbt.get_where_subquery", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/tests/where_subquery.sql", "original_file_path": "macros/materializations/tests/where_subquery.sql", "name": "get_where_subquery", "macro_sql": "{% macro get_where_subquery(relation) -%}\n {% do return(adapter.dispatch('get_where_subquery', 'dbt')(relation)) %}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__get_where_subquery"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.331757, "supported_languages": null}, "macro.dbt.default__get_where_subquery": {"unique_id": "macro.dbt.default__get_where_subquery", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/tests/where_subquery.sql", "original_file_path": "macros/materializations/tests/where_subquery.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.332093, "supported_languages": null}, "macro.dbt.get_quoted_csv": {"unique_id": "macro.dbt.get_quoted_csv", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/column_helpers.sql", "original_file_path": "macros/materializations/models/incremental/column_helpers.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.333629, "supported_languages": null}, "macro.dbt.diff_columns": {"unique_id": "macro.dbt.diff_columns", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/column_helpers.sql", "original_file_path": "macros/materializations/models/incremental/column_helpers.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.334193, "supported_languages": null}, "macro.dbt.diff_column_data_types": {"unique_id": "macro.dbt.diff_column_data_types", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/column_helpers.sql", "original_file_path": "macros/materializations/models/incremental/column_helpers.sql", "name": "diff_column_data_types", "macro_sql": "{% macro diff_column_data_types(source_columns, target_columns) %}\n\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.data_type != tc.data_type and not sc.can_expand_to(other_column=tc) %}\n {{ result.append( { 'column_name': tc.name, 'new_type': sc.data_type } ) }}\n {% endif %}\n {% endif %}\n {% endfor %}\n\n {{ return(result) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.334808, "supported_languages": null}, "macro.dbt.get_merge_update_columns": {"unique_id": "macro.dbt.get_merge_update_columns", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/column_helpers.sql", "original_file_path": "macros/materializations/models/incremental/column_helpers.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__get_merge_update_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.335022, "supported_languages": null}, "macro.dbt.default__get_merge_update_columns": {"unique_id": "macro.dbt.default__get_merge_update_columns", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/column_helpers.sql", "original_file_path": "macros/materializations/models/incremental/column_helpers.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.3356721, "supported_languages": null}, "macro.dbt.get_merge_sql": {"unique_id": "macro.dbt.get_merge_sql", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/merge.sql", "original_file_path": "macros/materializations/models/incremental/merge.sql", "name": "get_merge_sql", "macro_sql": "{% macro get_merge_sql(target, source, unique_key, dest_columns, predicates=none) -%}\n {{ adapter.dispatch('get_merge_sql', 'dbt')(target, source, unique_key, dest_columns, predicates) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__get_merge_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.339523, "supported_languages": null}, "macro.dbt.default__get_merge_sql": {"unique_id": "macro.dbt.default__get_merge_sql", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/merge.sql", "original_file_path": "macros/materializations/models/incremental/merge.sql", "name": "default__get_merge_sql", "macro_sql": "{% macro default__get_merge_sql(target, source, unique_key, dest_columns, predicates) -%}\n {%- set predicates = [] if predicates is none else [] + 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 unique_key_match %}\n DBT_INTERNAL_SOURCE.{{ unique_key }} = DBT_INTERNAL_DEST.{{ unique_key }}\n {% endset %}\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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.get_quoted_csv", "macro.dbt.get_merge_update_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.3409998, "supported_languages": null}, "macro.dbt.get_delete_insert_merge_sql": {"unique_id": "macro.dbt.get_delete_insert_merge_sql", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/merge.sql", "original_file_path": "macros/materializations/models/incremental/merge.sql", "name": "get_delete_insert_merge_sql", "macro_sql": "{% macro get_delete_insert_merge_sql(target, source, unique_key, dest_columns) -%}\n {{ adapter.dispatch('get_delete_insert_merge_sql', 'dbt')(target, source, unique_key, dest_columns) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__get_delete_insert_merge_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.341214, "supported_languages": null}, "macro.dbt.default__get_delete_insert_merge_sql": {"unique_id": "macro.dbt.default__get_delete_insert_merge_sql", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/merge.sql", "original_file_path": "macros/materializations/models/incremental/merge.sql", "name": "default__get_delete_insert_merge_sql", "macro_sql": "{% macro default__get_delete_insert_merge_sql(target, source, unique_key, dest_columns) -%}\n\n {%- set dest_cols_csv = get_quoted_csv(dest_columns | map(attribute=\"name\")) -%}\n\n {% if unique_key %}\n {% if unique_key is sequence and unique_key is not string %}\n delete from {{target }}\n using {{ source }}\n where (\n {% for key in unique_key %}\n {{ source }}.{{ key }} = {{ target }}.{{ key }}\n {{ \"and \" if not loop.last }}\n {% endfor %}\n );\n {% else %}\n delete from {{ target }}\n where (\n {{ unique_key }}) in (\n select ({{ unique_key }})\n from {{ source }}\n );\n\n {% endif %}\n {% endif %}\n\n insert into {{ target }} ({{ dest_cols_csv }})\n (\n select {{ dest_cols_csv }}\n from {{ source }}\n )\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.get_quoted_csv"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.341869, "supported_languages": null}, "macro.dbt.get_insert_overwrite_merge_sql": {"unique_id": "macro.dbt.get_insert_overwrite_merge_sql", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/merge.sql", "original_file_path": "macros/materializations/models/incremental/merge.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__get_insert_overwrite_merge_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.342106, "supported_languages": null}, "macro.dbt.default__get_insert_overwrite_merge_sql": {"unique_id": "macro.dbt.default__get_insert_overwrite_merge_sql", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/merge.sql", "original_file_path": "macros/materializations/models/incremental/merge.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.get_quoted_csv"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.342678, "supported_languages": null}, "macro.dbt.is_incremental": {"unique_id": "macro.dbt.is_incremental", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/is_incremental.sql", "original_file_path": "macros/materializations/models/incremental/is_incremental.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.should_full_refresh"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.343325, "supported_languages": null}, "macro.dbt.get_incremental_append_sql": {"unique_id": "macro.dbt.get_incremental_append_sql", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/strategies.sql", "original_file_path": "macros/materializations/models/incremental/strategies.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__get_incremental_append_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.3441541, "supported_languages": null}, "macro.dbt.default__get_incremental_append_sql": {"unique_id": "macro.dbt.default__get_incremental_append_sql", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/strategies.sql", "original_file_path": "macros/materializations/models/incremental/strategies.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.get_insert_into_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.344364, "supported_languages": null}, "macro.dbt.get_incremental_delete_insert_sql": {"unique_id": "macro.dbt.get_incremental_delete_insert_sql", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/strategies.sql", "original_file_path": "macros/materializations/models/incremental/strategies.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__get_incremental_delete_insert_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.344526, "supported_languages": null}, "macro.dbt.default__get_incremental_delete_insert_sql": {"unique_id": "macro.dbt.default__get_incremental_delete_insert_sql", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/strategies.sql", "original_file_path": "macros/materializations/models/incremental/strategies.sql", "name": "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\"])) %}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.get_delete_insert_merge_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.344762, "supported_languages": null}, "macro.dbt.get_incremental_merge_sql": {"unique_id": "macro.dbt.get_incremental_merge_sql", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/strategies.sql", "original_file_path": "macros/materializations/models/incremental/strategies.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__get_incremental_merge_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.344927, "supported_languages": null}, "macro.dbt.default__get_incremental_merge_sql": {"unique_id": "macro.dbt.default__get_incremental_merge_sql", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/strategies.sql", "original_file_path": "macros/materializations/models/incremental/strategies.sql", "name": "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\"])) %}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.get_merge_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.3451588, "supported_languages": null}, "macro.dbt.get_incremental_insert_overwrite_sql": {"unique_id": "macro.dbt.get_incremental_insert_overwrite_sql", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/strategies.sql", "original_file_path": "macros/materializations/models/incremental/strategies.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__get_incremental_insert_overwrite_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.345323, "supported_languages": null}, "macro.dbt.default__get_incremental_insert_overwrite_sql": {"unique_id": "macro.dbt.default__get_incremental_insert_overwrite_sql", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/strategies.sql", "original_file_path": "macros/materializations/models/incremental/strategies.sql", "name": "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[\"predicates\"])) %}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.get_insert_overwrite_merge_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.34557, "supported_languages": null}, "macro.dbt.get_incremental_default_sql": {"unique_id": "macro.dbt.get_incremental_default_sql", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/strategies.sql", "original_file_path": "macros/materializations/models/incremental/strategies.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__get_incremental_default_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.345738, "supported_languages": null}, "macro.dbt.default__get_incremental_default_sql": {"unique_id": "macro.dbt.default__get_incremental_default_sql", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/strategies.sql", "original_file_path": "macros/materializations/models/incremental/strategies.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.get_incremental_append_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.345872, "supported_languages": null}, "macro.dbt.get_insert_into_sql": {"unique_id": "macro.dbt.get_insert_into_sql", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/strategies.sql", "original_file_path": "macros/materializations/models/incremental/strategies.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.get_quoted_csv"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.3461308, "supported_languages": null}, "macro.dbt.materialization_incremental_default": {"unique_id": "macro.dbt.materialization_incremental_default", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/incremental.sql", "original_file_path": "macros/materializations/models/incremental/incremental.sql", "name": "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 {% if existing_relation is none %}\n {% set build_sql = get_create_table_as_sql(False, target_relation, sql) %}\n {% elif full_refresh_mode %}\n {% set build_sql = get_create_table_as_sql(False, intermediate_relation, sql) %}\n {% set need_swap = true %}\n {% else %}\n {% do run_query(get_create_table_as_sql(True, temp_relation, sql)) %}\n {% do adapter.expand_target_column_types(\n from_relation=temp_relation,\n to_relation=target_relation) %}\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_strategy = config.get('incremental_strategy') or 'default' %}\n {% set incremental_predicates = config.get('incremental_predicates', none) %}\n {% set strategy_sql_macro_func = adapter.get_incremental_strategy_macro(context, incremental_strategy) %}\n {% set strategy_arg_dict = ({'target_relation': target_relation, 'temp_relation': temp_relation, 'unique_key': unique_key, 'dest_columns': dest_columns, '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 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 {% if existing_relation is none or existing_relation.is_view or should_full_refresh() %}\n {% do create_indexes(target_relation) %}\n {% endif %}\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 %}", "resource_type": "macro", "tags": [], "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.should_revoke", "macro.dbt.apply_grants", "macro.dbt.persist_docs", "macro.dbt.create_indexes"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.3505669, "supported_languages": ["sql"]}, "macro.dbt.incremental_validate_on_schema_change": {"unique_id": "macro.dbt.incremental_validate_on_schema_change", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/on_schema_change.sql", "original_file_path": "macros/materializations/models/incremental/on_schema_change.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.355215, "supported_languages": null}, "macro.dbt.check_for_schema_changes": {"unique_id": "macro.dbt.check_for_schema_changes", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/on_schema_change.sql", "original_file_path": "macros/materializations/models/incremental/on_schema_change.sql", "name": "check_for_schema_changes", "macro_sql": "{% macro 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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.diff_columns", "macro.dbt.diff_column_data_types"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.356299, "supported_languages": null}, "macro.dbt.sync_column_schemas": {"unique_id": "macro.dbt.sync_column_schemas", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/on_schema_change.sql", "original_file_path": "macros/materializations/models/incremental/on_schema_change.sql", "name": "sync_column_schemas", "macro_sql": "{% macro 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\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 {%- 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 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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.alter_relation_add_remove_columns", "macro.dbt.alter_column_type"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.357395, "supported_languages": null}, "macro.dbt.process_schema_changes": {"unique_id": "macro.dbt.process_schema_changes", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/on_schema_change.sql", "original_file_path": "macros/materializations/models/incremental/on_schema_change.sql", "name": "process_schema_changes", "macro_sql": "{% macro 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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.check_for_schema_changes", "macro.dbt.sync_column_schemas"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.358155, "supported_languages": null}, "macro.dbt.materialization_table_default": {"unique_id": "macro.dbt.materialization_table_default", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/models/table/table.sql", "original_file_path": "macros/materializations/models/table/table.sql", "name": "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 -- cleanup\n {% if existing_relation is not none %}\n {{ adapter.rename_relation(existing_relation, backup_relation) }}\n {% endif %}\n\n {{ adapter.rename_relation(intermediate_relation, target_relation) }}\n\n {% do create_indexes(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 %}", "resource_type": "macro", "tags": [], "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}, "patch_path": null, "arguments": [], "created_at": 1666728757.360539, "supported_languages": ["sql"]}, "macro.dbt.get_create_table_as_sql": {"unique_id": "macro.dbt.get_create_table_as_sql", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/models/table/create_table_as.sql", "original_file_path": "macros/materializations/models/table/create_table_as.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__get_create_table_as_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.361058, "supported_languages": null}, "macro.dbt.default__get_create_table_as_sql": {"unique_id": "macro.dbt.default__get_create_table_as_sql", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/models/table/create_table_as.sql", "original_file_path": "macros/materializations/models/table/create_table_as.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.create_table_as"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.361226, "supported_languages": null}, "macro.dbt.create_table_as": {"unique_id": "macro.dbt.create_table_as", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/models/table/create_table_as.sql", "original_file_path": "macros/materializations/models/table/create_table_as.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_bigquery.bigquery__create_table_as"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.3616042, "supported_languages": null}, "macro.dbt.default__create_table_as": {"unique_id": "macro.dbt.default__create_table_as", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/models/table/create_table_as.sql", "original_file_path": "macros/materializations/models/table/create_table_as.sql", "name": "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 as (\n {{ sql }}\n );\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.36197, "supported_languages": null}, "macro.dbt.materialization_view_default": {"unique_id": "macro.dbt.materialization_view_default", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/models/view/view.sql", "original_file_path": "macros/materializations/models/view/view.sql", "name": "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 {{ adapter.rename_relation(existing_relation, backup_relation) }}\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 -%}", "resource_type": "macro", "tags": [], "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}, "patch_path": null, "arguments": [], "created_at": 1666728757.364301, "supported_languages": ["sql"]}, "macro.dbt.handle_existing_table": {"unique_id": "macro.dbt.handle_existing_table", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/models/view/helpers.sql", "original_file_path": "macros/materializations/models/view/helpers.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_bigquery.bigquery__handle_existing_table"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.3646238, "supported_languages": null}, "macro.dbt.default__handle_existing_table": {"unique_id": "macro.dbt.default__handle_existing_table", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/models/view/helpers.sql", "original_file_path": "macros/materializations/models/view/helpers.sql", "name": "default__handle_existing_table", "macro_sql": "{% macro default__handle_existing_table(full_refresh, old_relation) %}\n {{ log(\"Dropping relation \" ~ old_relation ~ \" because it is of type \" ~ old_relation.type) }}\n {{ adapter.drop_relation(old_relation) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.364823, "supported_languages": null}, "macro.dbt.create_or_replace_view": {"unique_id": "macro.dbt.create_or_replace_view", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/models/view/create_or_replace_view.sql", "original_file_path": "macros/materializations/models/view/create_or_replace_view.sql", "name": "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=True) %}\n\n {{ run_hooks(post_hooks) }}\n\n {{ return({'relations': [target_relation]}) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "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}, "patch_path": null, "arguments": [], "created_at": 1666728757.3662348, "supported_languages": null}, "macro.dbt.get_create_view_as_sql": {"unique_id": "macro.dbt.get_create_view_as_sql", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/models/view/create_view_as.sql", "original_file_path": "macros/materializations/models/view/create_view_as.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__get_create_view_as_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.366606, "supported_languages": null}, "macro.dbt.default__get_create_view_as_sql": {"unique_id": "macro.dbt.default__get_create_view_as_sql", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/models/view/create_view_as.sql", "original_file_path": "macros/materializations/models/view/create_view_as.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.create_view_as"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.366747, "supported_languages": null}, "macro.dbt.create_view_as": {"unique_id": "macro.dbt.create_view_as", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/models/view/create_view_as.sql", "original_file_path": "macros/materializations/models/view/create_view_as.sql", "name": "create_view_as", "macro_sql": "{% macro create_view_as(relation, sql) -%}\n {{ adapter.dispatch('create_view_as', 'dbt')(relation, sql) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_bigquery.bigquery__create_view_as"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.366909, "supported_languages": null}, "macro.dbt.default__create_view_as": {"unique_id": "macro.dbt.default__create_view_as", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/models/view/create_view_as.sql", "original_file_path": "macros/materializations/models/view/create_view_as.sql", "name": "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 }} as (\n {{ sql }}\n );\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.367135, "supported_languages": null}, "macro.dbt.materialization_seed_default": {"unique_id": "macro.dbt.materialization_seed_default", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/seeds/seed.sql", "original_file_path": "macros/materializations/seeds/seed.sql", "name": "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 comparision 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)) }}\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 = load_csv_rows(model, agate_table) %}\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 %}", "resource_type": "macro", "tags": [], "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}, "patch_path": null, "arguments": [], "created_at": 1666728757.3700638, "supported_languages": ["sql"]}, "macro.dbt.create_csv_table": {"unique_id": "macro.dbt.create_csv_table", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "name": "create_csv_table", "macro_sql": "{% macro create_csv_table(model, agate_table) -%}\n {{ adapter.dispatch('create_csv_table', 'dbt')(model, agate_table) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_bigquery.bigquery__create_csv_table"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.374207, "supported_languages": null}, "macro.dbt.default__create_csv_table": {"unique_id": "macro.dbt.default__create_csv_table", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.375, "supported_languages": null}, "macro.dbt.reset_csv_table": {"unique_id": "macro.dbt.reset_csv_table", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_bigquery.bigquery__reset_csv_table"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.375211, "supported_languages": null}, "macro.dbt.default__reset_csv_table": {"unique_id": "macro.dbt.default__reset_csv_table", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "name": "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 %}\n {% endif %}\n\n {{ return(sql) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.create_csv_table"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.375627, "supported_languages": null}, "macro.dbt.get_csv_sql": {"unique_id": "macro.dbt.get_csv_sql", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__get_csv_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.375797, "supported_languages": null}, "macro.dbt.default__get_csv_sql": {"unique_id": "macro.dbt.default__get_csv_sql", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.375911, "supported_languages": null}, "macro.dbt.get_binding_char": {"unique_id": "macro.dbt.get_binding_char", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "name": "get_binding_char", "macro_sql": "{% macro get_binding_char() -%}\n {{ adapter.dispatch('get_binding_char', 'dbt')() }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__get_binding_char"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.376034, "supported_languages": null}, "macro.dbt.default__get_binding_char": {"unique_id": "macro.dbt.default__get_binding_char", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "name": "default__get_binding_char", "macro_sql": "{% macro default__get_binding_char() %}\n {{ return('%s') }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.3761349, "supported_languages": null}, "macro.dbt.get_batch_size": {"unique_id": "macro.dbt.get_batch_size", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "name": "get_batch_size", "macro_sql": "{% macro get_batch_size() -%}\n {{ return(adapter.dispatch('get_batch_size', 'dbt')()) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__get_batch_size"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.376277, "supported_languages": null}, "macro.dbt.default__get_batch_size": {"unique_id": "macro.dbt.default__get_batch_size", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "name": "default__get_batch_size", "macro_sql": "{% macro default__get_batch_size() %}\n {{ return(10000) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.37638, "supported_languages": null}, "macro.dbt.get_seed_column_quoted_csv": {"unique_id": "macro.dbt.get_seed_column_quoted_csv", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.3768032, "supported_languages": null}, "macro.dbt.load_csv_rows": {"unique_id": "macro.dbt.load_csv_rows", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "name": "load_csv_rows", "macro_sql": "{% macro load_csv_rows(model, agate_table) -%}\n {{ adapter.dispatch('load_csv_rows', 'dbt')(model, agate_table) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_bigquery.bigquery__load_csv_rows"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.37697, "supported_languages": null}, "macro.dbt.default__load_csv_rows": {"unique_id": "macro.dbt.default__load_csv_rows", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "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}, "patch_path": null, "arguments": [], "created_at": 1666728757.3780968, "supported_languages": null}, "macro.dbt.generate_alias_name": {"unique_id": "macro.dbt.generate_alias_name", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/get_custom_name/get_custom_alias.sql", "original_file_path": "macros/get_custom_name/get_custom_alias.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__generate_alias_name"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.378491, "supported_languages": null}, "macro.dbt.default__generate_alias_name": {"unique_id": "macro.dbt.default__generate_alias_name", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/get_custom_name/get_custom_alias.sql", "original_file_path": "macros/get_custom_name/get_custom_alias.sql", "name": "default__generate_alias_name", "macro_sql": "{% macro default__generate_alias_name(custom_alias_name=none, node=none) -%}\n\n {%- if custom_alias_name is none -%}\n\n {{ node.name }}\n\n {%- else -%}\n\n {{ custom_alias_name | trim }}\n\n {%- endif -%}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.3786938, "supported_languages": null}, "macro.dbt.generate_schema_name": {"unique_id": "macro.dbt.generate_schema_name", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/get_custom_name/get_custom_schema.sql", "original_file_path": "macros/get_custom_name/get_custom_schema.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__generate_schema_name"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.379213, "supported_languages": null}, "macro.dbt.default__generate_schema_name": {"unique_id": "macro.dbt.default__generate_schema_name", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/get_custom_name/get_custom_schema.sql", "original_file_path": "macros/get_custom_name/get_custom_schema.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.37945, "supported_languages": null}, "macro.dbt.generate_schema_name_for_env": {"unique_id": "macro.dbt.generate_schema_name_for_env", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/get_custom_name/get_custom_schema.sql", "original_file_path": "macros/get_custom_name/get_custom_schema.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.379704, "supported_languages": null}, "macro.dbt.generate_database_name": {"unique_id": "macro.dbt.generate_database_name", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/get_custom_name/get_custom_database.sql", "original_file_path": "macros/get_custom_name/get_custom_database.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__generate_database_name"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.3801038, "supported_languages": null}, "macro.dbt.default__generate_database_name": {"unique_id": "macro.dbt.default__generate_database_name", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/get_custom_name/get_custom_database.sql", "original_file_path": "macros/get_custom_name/get_custom_database.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.380325, "supported_languages": null}, "macro.dbt.default__test_relationships": {"unique_id": "macro.dbt.default__test_relationships", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/generic_test_sql/relationships.sql", "original_file_path": "macros/generic_test_sql/relationships.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.380694, "supported_languages": null}, "macro.dbt.default__test_not_null": {"unique_id": "macro.dbt.default__test_not_null", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/generic_test_sql/not_null.sql", "original_file_path": "macros/generic_test_sql/not_null.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.should_store_failures"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.381013, "supported_languages": null}, "macro.dbt.default__test_unique": {"unique_id": "macro.dbt.default__test_unique", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/generic_test_sql/unique.sql", "original_file_path": "macros/generic_test_sql/unique.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.381284, "supported_languages": null}, "macro.dbt.default__test_accepted_values": {"unique_id": "macro.dbt.default__test_accepted_values", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/generic_test_sql/accepted_values.sql", "original_file_path": "macros/generic_test_sql/accepted_values.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.381842, "supported_languages": null}, "macro.dbt.statement": {"unique_id": "macro.dbt.statement", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/etc/statement.sql", "original_file_path": "macros/etc/statement.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.383198, "supported_languages": null}, "macro.dbt.noop_statement": {"unique_id": "macro.dbt.noop_statement", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/etc/statement.sql", "original_file_path": "macros/etc/statement.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.383955, "supported_languages": null}, "macro.dbt.run_query": {"unique_id": "macro.dbt.run_query", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/etc/statement.sql", "original_file_path": "macros/etc/statement.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.384213, "supported_languages": null}, "macro.dbt.convert_datetime": {"unique_id": "macro.dbt.convert_datetime", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/etc/datetime.sql", "original_file_path": "macros/etc/datetime.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.3858151, "supported_languages": null}, "macro.dbt.dates_in_range": {"unique_id": "macro.dbt.dates_in_range", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/etc/datetime.sql", "original_file_path": "macros/etc/datetime.sql", "name": "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 Partiton 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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.convert_datetime"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.386862, "supported_languages": null}, "macro.dbt.partition_range": {"unique_id": "macro.dbt.partition_range", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/etc/datetime.sql", "original_file_path": "macros/etc/datetime.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.dates_in_range"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.387539, "supported_languages": null}, "macro.dbt.py_current_timestring": {"unique_id": "macro.dbt.py_current_timestring", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/etc/datetime.sql", "original_file_path": "macros/etc/datetime.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.387748, "supported_languages": null}, "macro.dbt.except": {"unique_id": "macro.dbt.except", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/utils/except.sql", "original_file_path": "macros/utils/except.sql", "name": "except", "macro_sql": "{% macro except() %}\n {{ return(adapter.dispatch('except', 'dbt')()) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_bigquery.bigquery__except"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.388026, "supported_languages": null}, "macro.dbt.default__except": {"unique_id": "macro.dbt.default__except", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/utils/except.sql", "original_file_path": "macros/utils/except.sql", "name": "default__except", "macro_sql": "{% macro default__except() %}\n\n except\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.388095, "supported_languages": null}, "macro.dbt.replace": {"unique_id": "macro.dbt.replace", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/utils/replace.sql", "original_file_path": "macros/utils/replace.sql", "name": "replace", "macro_sql": "{% macro replace(field, old_chars, new_chars) -%}\n {{ return(adapter.dispatch('replace', 'dbt') (field, old_chars, new_chars)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__replace"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.388438, "supported_languages": null}, "macro.dbt.default__replace": {"unique_id": "macro.dbt.default__replace", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/utils/replace.sql", "original_file_path": "macros/utils/replace.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.38858, "supported_languages": null}, "macro.dbt.concat": {"unique_id": "macro.dbt.concat", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/utils/concat.sql", "original_file_path": "macros/utils/concat.sql", "name": "concat", "macro_sql": "{% macro concat(fields) -%}\n {{ return(adapter.dispatch('concat', 'dbt')(fields)) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__concat"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.388852, "supported_languages": null}, "macro.dbt.default__concat": {"unique_id": "macro.dbt.default__concat", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/utils/concat.sql", "original_file_path": "macros/utils/concat.sql", "name": "default__concat", "macro_sql": "{% macro default__concat(fields) -%}\n {{ fields|join(' || ') }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.388972, "supported_languages": null}, "macro.dbt.length": {"unique_id": "macro.dbt.length", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/utils/length.sql", "original_file_path": "macros/utils/length.sql", "name": "length", "macro_sql": "{% macro length(expression) -%}\n {{ return(adapter.dispatch('length', 'dbt') (expression)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__length"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.389249, "supported_languages": null}, "macro.dbt.default__length": {"unique_id": "macro.dbt.default__length", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/utils/length.sql", "original_file_path": "macros/utils/length.sql", "name": "default__length", "macro_sql": "{% macro default__length(expression) %}\n\n length(\n {{ expression }}\n )\n\n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.3893461, "supported_languages": null}, "macro.dbt.dateadd": {"unique_id": "macro.dbt.dateadd", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/utils/dateadd.sql", "original_file_path": "macros/utils/dateadd.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_bigquery.bigquery__dateadd"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.3896918, "supported_languages": null}, "macro.dbt.default__dateadd": {"unique_id": "macro.dbt.default__dateadd", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/utils/dateadd.sql", "original_file_path": "macros/utils/dateadd.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.389837, "supported_languages": null}, "macro.dbt.intersect": {"unique_id": "macro.dbt.intersect", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/utils/intersect.sql", "original_file_path": "macros/utils/intersect.sql", "name": "intersect", "macro_sql": "{% macro intersect() %}\n {{ return(adapter.dispatch('intersect', 'dbt')()) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_bigquery.bigquery__intersect"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.390083, "supported_languages": null}, "macro.dbt.default__intersect": {"unique_id": "macro.dbt.default__intersect", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/utils/intersect.sql", "original_file_path": "macros/utils/intersect.sql", "name": "default__intersect", "macro_sql": "{% macro default__intersect() %}\n\n intersect\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.3901582, "supported_languages": null}, "macro.dbt.escape_single_quotes": {"unique_id": "macro.dbt.escape_single_quotes", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/utils/escape_single_quotes.sql", "original_file_path": "macros/utils/escape_single_quotes.sql", "name": "escape_single_quotes", "macro_sql": "{% macro escape_single_quotes(expression) %}\n {{ return(adapter.dispatch('escape_single_quotes', 'dbt') (expression)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_bigquery.bigquery__escape_single_quotes"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.3904471, "supported_languages": null}, "macro.dbt.default__escape_single_quotes": {"unique_id": "macro.dbt.default__escape_single_quotes", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/utils/escape_single_quotes.sql", "original_file_path": "macros/utils/escape_single_quotes.sql", "name": "default__escape_single_quotes", "macro_sql": "{% macro default__escape_single_quotes(expression) -%}\n{{ expression | replace(\"'\",\"''\") }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.3905761, "supported_languages": null}, "macro.dbt.right": {"unique_id": "macro.dbt.right", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/utils/right.sql", "original_file_path": "macros/utils/right.sql", "name": "right", "macro_sql": "{% macro right(string_text, length_expression) -%}\n {{ return(adapter.dispatch('right', 'dbt') (string_text, length_expression)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_bigquery.bigquery__right"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.390893, "supported_languages": null}, "macro.dbt.default__right": {"unique_id": "macro.dbt.default__right", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/utils/right.sql", "original_file_path": "macros/utils/right.sql", "name": "default__right", "macro_sql": "{% macro default__right(string_text, length_expression) %}\n\n right(\n {{ string_text }},\n {{ length_expression }}\n )\n\n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.3910751, "supported_languages": null}, "macro.dbt.listagg": {"unique_id": "macro.dbt.listagg", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/utils/listagg.sql", "original_file_path": "macros/utils/listagg.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_bigquery.bigquery__listagg"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.39168, "supported_languages": null}, "macro.dbt.default__listagg": {"unique_id": "macro.dbt.default__listagg", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/utils/listagg.sql", "original_file_path": "macros/utils/listagg.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.392041, "supported_languages": null}, "macro.dbt.datediff": {"unique_id": "macro.dbt.datediff", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/utils/datediff.sql", "original_file_path": "macros/utils/datediff.sql", "name": "datediff", "macro_sql": "{% macro datediff(first_date, second_date, datepart) %}\n {{ return(adapter.dispatch('datediff', 'dbt')(first_date, second_date, datepart)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_bigquery.bigquery__datediff"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.392386, "supported_languages": null}, "macro.dbt.default__datediff": {"unique_id": "macro.dbt.default__datediff", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/utils/datediff.sql", "original_file_path": "macros/utils/datediff.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.3925278, "supported_languages": null}, "macro.dbt.safe_cast": {"unique_id": "macro.dbt.safe_cast", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/utils/safe_cast.sql", "original_file_path": "macros/utils/safe_cast.sql", "name": "safe_cast", "macro_sql": "{% macro safe_cast(field, type) %}\n {{ return(adapter.dispatch('safe_cast', 'dbt') (field, type)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_bigquery.bigquery__safe_cast"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.39284, "supported_languages": null}, "macro.dbt.default__safe_cast": {"unique_id": "macro.dbt.default__safe_cast", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/utils/safe_cast.sql", "original_file_path": "macros/utils/safe_cast.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.3929658, "supported_languages": null}, "macro.dbt.hash": {"unique_id": "macro.dbt.hash", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/utils/hash.sql", "original_file_path": "macros/utils/hash.sql", "name": "hash", "macro_sql": "{% macro hash(field) -%}\n {{ return(adapter.dispatch('hash', 'dbt') (field)) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_bigquery.bigquery__hash"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.3932428, "supported_languages": null}, "macro.dbt.default__hash": {"unique_id": "macro.dbt.default__hash", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/utils/hash.sql", "original_file_path": "macros/utils/hash.sql", "name": "default__hash", "macro_sql": "{% macro default__hash(field) -%}\n md5(cast({{ field }} as {{ api.Column.translate_type('string') }}))\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.393388, "supported_languages": null}, "macro.dbt.cast_bool_to_text": {"unique_id": "macro.dbt.cast_bool_to_text", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/utils/cast_bool_to_text.sql", "original_file_path": "macros/utils/cast_bool_to_text.sql", "name": "cast_bool_to_text", "macro_sql": "{% macro cast_bool_to_text(field) %}\n {{ adapter.dispatch('cast_bool_to_text', 'dbt') (field) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__cast_bool_to_text"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.393657, "supported_languages": null}, "macro.dbt.default__cast_bool_to_text": {"unique_id": "macro.dbt.default__cast_bool_to_text", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/utils/cast_bool_to_text.sql", "original_file_path": "macros/utils/cast_bool_to_text.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.3937988, "supported_languages": null}, "macro.dbt.any_value": {"unique_id": "macro.dbt.any_value", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/utils/any_value.sql", "original_file_path": "macros/utils/any_value.sql", "name": "any_value", "macro_sql": "{% macro any_value(expression) -%}\n {{ return(adapter.dispatch('any_value', 'dbt') (expression)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__any_value"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.394067, "supported_languages": null}, "macro.dbt.default__any_value": {"unique_id": "macro.dbt.default__any_value", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/utils/any_value.sql", "original_file_path": "macros/utils/any_value.sql", "name": "default__any_value", "macro_sql": "{% macro default__any_value(expression) -%}\n\n any_value({{ expression }})\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.39416, "supported_languages": null}, "macro.dbt.position": {"unique_id": "macro.dbt.position", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/utils/position.sql", "original_file_path": "macros/utils/position.sql", "name": "position", "macro_sql": "{% macro position(substring_text, string_text) -%}\n {{ return(adapter.dispatch('position', 'dbt') (substring_text, string_text)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_bigquery.bigquery__position"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.394469, "supported_languages": null}, "macro.dbt.default__position": {"unique_id": "macro.dbt.default__position", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/utils/position.sql", "original_file_path": "macros/utils/position.sql", "name": "default__position", "macro_sql": "{% macro default__position(substring_text, string_text) %}\n\n position(\n {{ substring_text }} in {{ string_text }}\n )\n\n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.394588, "supported_languages": null}, "macro.dbt.string_literal": {"unique_id": "macro.dbt.string_literal", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/utils/literal.sql", "original_file_path": "macros/utils/literal.sql", "name": "string_literal", "macro_sql": "{%- macro string_literal(value) -%}\n {{ return(adapter.dispatch('string_literal', 'dbt') (value)) }}\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__string_literal"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.394866, "supported_languages": null}, "macro.dbt.default__string_literal": {"unique_id": "macro.dbt.default__string_literal", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/utils/literal.sql", "original_file_path": "macros/utils/literal.sql", "name": "default__string_literal", "macro_sql": "{% macro default__string_literal(value) -%}\n '{{ value }}'\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.394957, "supported_languages": null}, "macro.dbt.type_string": {"unique_id": "macro.dbt.type_string", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "name": "type_string", "macro_sql": "\n\n{%- macro type_string() -%}\n {{ return(adapter.dispatch('type_string', 'dbt')()) }}\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.3958359, "supported_languages": null}, "macro.dbt.default__type_string": {"unique_id": "macro.dbt.default__type_string", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "name": "default__type_string", "macro_sql": "{% macro default__type_string() %}\n {{ return(api.Column.translate_type(\"string\")) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.395971, "supported_languages": null}, "macro.dbt.type_timestamp": {"unique_id": "macro.dbt.type_timestamp", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "name": "type_timestamp", "macro_sql": "\n\n{%- macro type_timestamp() -%}\n {{ return(adapter.dispatch('type_timestamp', 'dbt')()) }}\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__type_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.396173, "supported_languages": null}, "macro.dbt.default__type_timestamp": {"unique_id": "macro.dbt.default__type_timestamp", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "name": "default__type_timestamp", "macro_sql": "{% macro default__type_timestamp() %}\n {{ return(api.Column.translate_type(\"timestamp\")) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.3963149, "supported_languages": null}, "macro.dbt.type_float": {"unique_id": "macro.dbt.type_float", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "name": "type_float", "macro_sql": "\n\n{%- macro type_float() -%}\n {{ return(adapter.dispatch('type_float', 'dbt')()) }}\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__type_float"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.396459, "supported_languages": null}, "macro.dbt.default__type_float": {"unique_id": "macro.dbt.default__type_float", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "name": "default__type_float", "macro_sql": "{% macro default__type_float() %}\n {{ return(api.Column.translate_type(\"float\")) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.3965929, "supported_languages": null}, "macro.dbt.type_numeric": {"unique_id": "macro.dbt.type_numeric", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "name": "type_numeric", "macro_sql": "\n\n{%- macro type_numeric() -%}\n {{ return(adapter.dispatch('type_numeric', 'dbt')()) }}\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__type_numeric"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.396739, "supported_languages": null}, "macro.dbt.default__type_numeric": {"unique_id": "macro.dbt.default__type_numeric", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "name": "default__type_numeric", "macro_sql": "{% macro default__type_numeric() %}\n {{ return(api.Column.numeric_type(\"numeric\", 28, 6)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.396896, "supported_languages": null}, "macro.dbt.type_bigint": {"unique_id": "macro.dbt.type_bigint", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "name": "type_bigint", "macro_sql": "\n\n{%- macro type_bigint() -%}\n {{ return(adapter.dispatch('type_bigint', 'dbt')()) }}\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__type_bigint"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.397042, "supported_languages": null}, "macro.dbt.default__type_bigint": {"unique_id": "macro.dbt.default__type_bigint", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "name": "default__type_bigint", "macro_sql": "{% macro default__type_bigint() %}\n {{ return(api.Column.translate_type(\"bigint\")) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.397177, "supported_languages": null}, "macro.dbt.type_int": {"unique_id": "macro.dbt.type_int", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "name": "type_int", "macro_sql": "\n\n{%- macro type_int() -%}\n {{ return(adapter.dispatch('type_int', 'dbt')()) }}\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__type_int"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.3973172, "supported_languages": null}, "macro.dbt.default__type_int": {"unique_id": "macro.dbt.default__type_int", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "name": "default__type_int", "macro_sql": "{%- macro default__type_int() -%}\n {{ return(api.Column.translate_type(\"integer\")) }}\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.397446, "supported_languages": null}, "macro.dbt.type_boolean": {"unique_id": "macro.dbt.type_boolean", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "name": "type_boolean", "macro_sql": "\n\n{%- macro type_boolean() -%}\n {{ return(adapter.dispatch('type_boolean', 'dbt')()) }}\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__type_boolean"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.397588, "supported_languages": null}, "macro.dbt.default__type_boolean": {"unique_id": "macro.dbt.default__type_boolean", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "name": "default__type_boolean", "macro_sql": "{%- macro default__type_boolean() -%}\n {{ return(api.Column.translate_type(\"boolean\")) }}\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.397716, "supported_languages": null}, "macro.dbt.array_concat": {"unique_id": "macro.dbt.array_concat", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/utils/array_concat.sql", "original_file_path": "macros/utils/array_concat.sql", "name": "array_concat", "macro_sql": "{% macro array_concat(array_1, array_2) -%}\n {{ return(adapter.dispatch('array_concat', 'dbt')(array_1, array_2)) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_bigquery.bigquery__array_concat"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.398014, "supported_languages": null}, "macro.dbt.default__array_concat": {"unique_id": "macro.dbt.default__array_concat", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/utils/array_concat.sql", "original_file_path": "macros/utils/array_concat.sql", "name": "default__array_concat", "macro_sql": "{% macro default__array_concat(array_1, array_2) -%}\n array_cat({{ array_1 }}, {{ array_2 }})\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.398127, "supported_languages": null}, "macro.dbt.bool_or": {"unique_id": "macro.dbt.bool_or", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/utils/bool_or.sql", "original_file_path": "macros/utils/bool_or.sql", "name": "bool_or", "macro_sql": "{% macro bool_or(expression) -%}\n {{ return(adapter.dispatch('bool_or', 'dbt') (expression)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_bigquery.bigquery__bool_or"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.3983948, "supported_languages": null}, "macro.dbt.default__bool_or": {"unique_id": "macro.dbt.default__bool_or", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/utils/bool_or.sql", "original_file_path": "macros/utils/bool_or.sql", "name": "default__bool_or", "macro_sql": "{% macro default__bool_or(expression) -%}\n\n bool_or({{ expression }})\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.398489, "supported_languages": null}, "macro.dbt.last_day": {"unique_id": "macro.dbt.last_day", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/utils/last_day.sql", "original_file_path": "macros/utils/last_day.sql", "name": "last_day", "macro_sql": "{% macro last_day(date, datepart) %}\n {{ return(adapter.dispatch('last_day', 'dbt') (date, datepart)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__last_day"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.39884, "supported_languages": null}, "macro.dbt.default_last_day": {"unique_id": "macro.dbt.default_last_day", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/utils/last_day.sql", "original_file_path": "macros/utils/last_day.sql", "name": "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", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.dateadd", "macro.dbt.date_trunc"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.399074, "supported_languages": null}, "macro.dbt.default__last_day": {"unique_id": "macro.dbt.default__last_day", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/utils/last_day.sql", "original_file_path": "macros/utils/last_day.sql", "name": "default__last_day", "macro_sql": "{% macro default__last_day(date, datepart) -%}\n {{dbt.default_last_day(date, datepart)}}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default_last_day"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.3992052, "supported_languages": null}, "macro.dbt.split_part": {"unique_id": "macro.dbt.split_part", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/utils/split_part.sql", "original_file_path": "macros/utils/split_part.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_bigquery.bigquery__split_part"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.399704, "supported_languages": null}, "macro.dbt.default__split_part": {"unique_id": "macro.dbt.default__split_part", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/utils/split_part.sql", "original_file_path": "macros/utils/split_part.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.399915, "supported_languages": null}, "macro.dbt._split_part_negative": {"unique_id": "macro.dbt._split_part_negative", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/utils/split_part.sql", "original_file_path": "macros/utils/split_part.sql", "name": "_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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.400107, "supported_languages": null}, "macro.dbt.date_trunc": {"unique_id": "macro.dbt.date_trunc", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/utils/date_trunc.sql", "original_file_path": "macros/utils/date_trunc.sql", "name": "date_trunc", "macro_sql": "{% macro date_trunc(datepart, date) -%}\n {{ return(adapter.dispatch('date_trunc', 'dbt') (datepart, date)) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_bigquery.bigquery__date_trunc"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.400398, "supported_languages": null}, "macro.dbt.default__date_trunc": {"unique_id": "macro.dbt.default__date_trunc", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/utils/date_trunc.sql", "original_file_path": "macros/utils/date_trunc.sql", "name": "default__date_trunc", "macro_sql": "{% macro default__date_trunc(datepart, date) -%}\n date_trunc('{{datepart}}', {{date}})\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.400511, "supported_languages": null}, "macro.dbt.array_construct": {"unique_id": "macro.dbt.array_construct", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/utils/array_construct.sql", "original_file_path": "macros/utils/array_construct.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_bigquery.bigquery__array_construct"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.400892, "supported_languages": null}, "macro.dbt.default__array_construct": {"unique_id": "macro.dbt.default__array_construct", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/utils/array_construct.sql", "original_file_path": "macros/utils/array_construct.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.401108, "supported_languages": null}, "macro.dbt.array_append": {"unique_id": "macro.dbt.array_append", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/utils/array_append.sql", "original_file_path": "macros/utils/array_append.sql", "name": "array_append", "macro_sql": "{% macro array_append(array, new_element) -%}\n {{ return(adapter.dispatch('array_append', 'dbt')(array, new_element)) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_bigquery.bigquery__array_append"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.401407, "supported_languages": null}, "macro.dbt.default__array_append": {"unique_id": "macro.dbt.default__array_append", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/utils/array_append.sql", "original_file_path": "macros/utils/array_append.sql", "name": "default__array_append", "macro_sql": "{% macro default__array_append(array, new_element) -%}\n array_append({{ array }}, {{ new_element }})\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.4015229, "supported_languages": null}, "macro.dbt.create_schema": {"unique_id": "macro.dbt.create_schema", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/schema.sql", "original_file_path": "macros/adapters/schema.sql", "name": "create_schema", "macro_sql": "{% macro create_schema(relation) -%}\n {{ adapter.dispatch('create_schema', 'dbt')(relation) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__create_schema"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.401898, "supported_languages": null}, "macro.dbt.default__create_schema": {"unique_id": "macro.dbt.default__create_schema", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/schema.sql", "original_file_path": "macros/adapters/schema.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.402058, "supported_languages": null}, "macro.dbt.drop_schema": {"unique_id": "macro.dbt.drop_schema", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/schema.sql", "original_file_path": "macros/adapters/schema.sql", "name": "drop_schema", "macro_sql": "{% macro drop_schema(relation) -%}\n {{ adapter.dispatch('drop_schema', 'dbt')(relation) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_bigquery.bigquery__drop_schema"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.4022021, "supported_languages": null}, "macro.dbt.default__drop_schema": {"unique_id": "macro.dbt.default__drop_schema", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/schema.sql", "original_file_path": "macros/adapters/schema.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.4023628, "supported_languages": null}, "macro.dbt.current_timestamp": {"unique_id": "macro.dbt.current_timestamp", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/timestamps.sql", "original_file_path": "macros/adapters/timestamps.sql", "name": "current_timestamp", "macro_sql": "{%- macro current_timestamp() -%}\n {{ adapter.dispatch('current_timestamp', 'dbt')() }}\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_bigquery.bigquery__current_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.4028668, "supported_languages": null}, "macro.dbt.default__current_timestamp": {"unique_id": "macro.dbt.default__current_timestamp", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/timestamps.sql", "original_file_path": "macros/adapters/timestamps.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.403002, "supported_languages": null}, "macro.dbt.snapshot_get_time": {"unique_id": "macro.dbt.snapshot_get_time", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/timestamps.sql", "original_file_path": "macros/adapters/timestamps.sql", "name": "snapshot_get_time", "macro_sql": "\n\n{%- macro snapshot_get_time() -%}\n {{ adapter.dispatch('snapshot_get_time', 'dbt')() }}\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__snapshot_get_time"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.4031308, "supported_languages": null}, "macro.dbt.default__snapshot_get_time": {"unique_id": "macro.dbt.default__snapshot_get_time", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/timestamps.sql", "original_file_path": "macros/adapters/timestamps.sql", "name": "default__snapshot_get_time", "macro_sql": "{% macro default__snapshot_get_time() %}\n {{ current_timestamp() }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.current_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.4032269, "supported_languages": null}, "macro.dbt.current_timestamp_backcompat": {"unique_id": "macro.dbt.current_timestamp_backcompat", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/timestamps.sql", "original_file_path": "macros/adapters/timestamps.sql", "name": "current_timestamp_backcompat", "macro_sql": "{% macro current_timestamp_backcompat() %}\n {{ return(adapter.dispatch('current_timestamp_backcompat', 'dbt')()) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_bigquery.bigquery__current_timestamp_backcompat"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.403382, "supported_languages": null}, "macro.dbt.default__current_timestamp_backcompat": {"unique_id": "macro.dbt.default__current_timestamp_backcompat", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/timestamps.sql", "original_file_path": "macros/adapters/timestamps.sql", "name": "default__current_timestamp_backcompat", "macro_sql": "{% macro default__current_timestamp_backcompat() %}\n current_timestamp::timestamp\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.403452, "supported_languages": null}, "macro.dbt.current_timestamp_in_utc_backcompat": {"unique_id": "macro.dbt.current_timestamp_in_utc_backcompat", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/timestamps.sql", "original_file_path": "macros/adapters/timestamps.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__current_timestamp_in_utc_backcompat"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.403598, "supported_languages": null}, "macro.dbt.default__current_timestamp_in_utc_backcompat": {"unique_id": "macro.dbt.default__current_timestamp_in_utc_backcompat", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/timestamps.sql", "original_file_path": "macros/adapters/timestamps.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.current_timestamp_backcompat", "macro.dbt_bigquery.bigquery__current_timestamp_backcompat"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.403741, "supported_languages": null}, "macro.dbt.get_create_index_sql": {"unique_id": "macro.dbt.get_create_index_sql", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/indexes.sql", "original_file_path": "macros/adapters/indexes.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__get_create_index_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.4042659, "supported_languages": null}, "macro.dbt.default__get_create_index_sql": {"unique_id": "macro.dbt.default__get_create_index_sql", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/indexes.sql", "original_file_path": "macros/adapters/indexes.sql", "name": "default__get_create_index_sql", "macro_sql": "{% macro default__get_create_index_sql(relation, index_dict) -%}\n {% do return(None) %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.4043891, "supported_languages": null}, "macro.dbt.create_indexes": {"unique_id": "macro.dbt.create_indexes", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/indexes.sql", "original_file_path": "macros/adapters/indexes.sql", "name": "create_indexes", "macro_sql": "{% macro create_indexes(relation) -%}\n {{ adapter.dispatch('create_indexes', 'dbt')(relation) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__create_indexes"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.4045272, "supported_languages": null}, "macro.dbt.default__create_indexes": {"unique_id": "macro.dbt.default__create_indexes", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/indexes.sql", "original_file_path": "macros/adapters/indexes.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.get_create_index_sql", "macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.404882, "supported_languages": null}, "macro.dbt.make_intermediate_relation": {"unique_id": "macro.dbt.make_intermediate_relation", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__make_intermediate_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.407733, "supported_languages": null}, "macro.dbt.default__make_intermediate_relation": {"unique_id": "macro.dbt.default__make_intermediate_relation", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__make_temp_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.4078798, "supported_languages": null}, "macro.dbt.make_temp_relation": {"unique_id": "macro.dbt.make_temp_relation", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "name": "make_temp_relation", "macro_sql": "{% macro make_temp_relation(base_relation, suffix='__dbt_tmp') %}\n {{ return(adapter.dispatch('make_temp_relation', 'dbt')(base_relation, suffix)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__make_temp_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.4080708, "supported_languages": null}, "macro.dbt.default__make_temp_relation": {"unique_id": "macro.dbt.default__make_temp_relation", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.408336, "supported_languages": null}, "macro.dbt.make_backup_relation": {"unique_id": "macro.dbt.make_backup_relation", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__make_backup_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.408561, "supported_languages": null}, "macro.dbt.default__make_backup_relation": {"unique_id": "macro.dbt.default__make_backup_relation", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.408861, "supported_languages": null}, "macro.dbt.drop_relation": {"unique_id": "macro.dbt.drop_relation", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "name": "drop_relation", "macro_sql": "{% macro drop_relation(relation) -%}\n {{ return(adapter.dispatch('drop_relation', 'dbt')(relation)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_bigquery.bigquery__drop_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.409023, "supported_languages": null}, "macro.dbt.default__drop_relation": {"unique_id": "macro.dbt.default__drop_relation", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "name": "default__drop_relation", "macro_sql": "{% macro default__drop_relation(relation) -%}\n {% call statement('drop_relation', auto_begin=False) -%}\n drop {{ relation.type }} if exists {{ relation }} cascade\n {%- endcall %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.4092128, "supported_languages": null}, "macro.dbt.truncate_relation": {"unique_id": "macro.dbt.truncate_relation", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "name": "truncate_relation", "macro_sql": "{% macro truncate_relation(relation) -%}\n {{ return(adapter.dispatch('truncate_relation', 'dbt')(relation)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__truncate_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.409374, "supported_languages": null}, "macro.dbt.default__truncate_relation": {"unique_id": "macro.dbt.default__truncate_relation", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "name": "default__truncate_relation", "macro_sql": "{% macro default__truncate_relation(relation) -%}\n {% call statement('truncate_relation') -%}\n truncate table {{ relation }}\n {%- endcall %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.409518, "supported_languages": null}, "macro.dbt.rename_relation": {"unique_id": "macro.dbt.rename_relation", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "name": "rename_relation", "macro_sql": "{% macro rename_relation(from_relation, to_relation) -%}\n {{ return(adapter.dispatch('rename_relation', 'dbt')(from_relation, to_relation)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_bigquery.bigquery__rename_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.409698, "supported_languages": null}, "macro.dbt.default__rename_relation": {"unique_id": "macro.dbt.default__rename_relation", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "name": "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 }} rename to {{ target_name }}\n {%- endcall %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.409942, "supported_languages": null}, "macro.dbt.get_or_create_relation": {"unique_id": "macro.dbt.get_or_create_relation", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__get_or_create_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.410163, "supported_languages": null}, "macro.dbt.default__get_or_create_relation": {"unique_id": "macro.dbt.default__get_or_create_relation", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.4107149, "supported_languages": null}, "macro.dbt.load_cached_relation": {"unique_id": "macro.dbt.load_cached_relation", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.410918, "supported_languages": null}, "macro.dbt.load_relation": {"unique_id": "macro.dbt.load_relation", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "name": "load_relation", "macro_sql": "{% macro load_relation(relation) %}\n {{ return(load_cached_relation(relation)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.load_cached_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.4110432, "supported_languages": null}, "macro.dbt.drop_relation_if_exists": {"unique_id": "macro.dbt.drop_relation_if_exists", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.411211, "supported_languages": null}, "macro.dbt.collect_freshness": {"unique_id": "macro.dbt.collect_freshness", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/freshness.sql", "original_file_path": "macros/adapters/freshness.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__collect_freshness"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.411645, "supported_languages": null}, "macro.dbt.default__collect_freshness": {"unique_id": "macro.dbt.default__collect_freshness", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/freshness.sql", "original_file_path": "macros/adapters/freshness.sql", "name": "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').table) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement", "macro.dbt.current_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.41201, "supported_languages": null}, "macro.dbt.copy_grants": {"unique_id": "macro.dbt.copy_grants", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "name": "copy_grants", "macro_sql": "{% macro copy_grants() %}\n {{ return(adapter.dispatch('copy_grants', 'dbt')()) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__copy_grants"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.413606, "supported_languages": null}, "macro.dbt.default__copy_grants": {"unique_id": "macro.dbt.default__copy_grants", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "name": "default__copy_grants", "macro_sql": "{% macro default__copy_grants() %}\n {{ return(True) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.4137259, "supported_languages": null}, "macro.dbt.support_multiple_grantees_per_dcl_statement": {"unique_id": "macro.dbt.support_multiple_grantees_per_dcl_statement", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__support_multiple_grantees_per_dcl_statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.413876, "supported_languages": null}, "macro.dbt.default__support_multiple_grantees_per_dcl_statement": {"unique_id": "macro.dbt.default__support_multiple_grantees_per_dcl_statement", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "name": "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", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.4139771, "supported_languages": null}, "macro.dbt.should_revoke": {"unique_id": "macro.dbt.should_revoke", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.copy_grants"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.4142709, "supported_languages": null}, "macro.dbt.get_show_grant_sql": {"unique_id": "macro.dbt.get_show_grant_sql", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "name": "get_show_grant_sql", "macro_sql": "{% macro get_show_grant_sql(relation) %}\n {{ return(adapter.dispatch(\"get_show_grant_sql\", \"dbt\")(relation)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_bigquery.bigquery__get_show_grant_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.414437, "supported_languages": null}, "macro.dbt.default__get_show_grant_sql": {"unique_id": "macro.dbt.default__get_show_grant_sql", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "name": "default__get_show_grant_sql", "macro_sql": "{% macro default__get_show_grant_sql(relation) %}\n show grants on {{ relation }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.41453, "supported_languages": null}, "macro.dbt.get_grant_sql": {"unique_id": "macro.dbt.get_grant_sql", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_bigquery.bigquery__get_grant_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.414732, "supported_languages": null}, "macro.dbt.default__get_grant_sql": {"unique_id": "macro.dbt.default__get_grant_sql", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "name": "default__get_grant_sql", "macro_sql": "\n\n{%- macro default__get_grant_sql(relation, privilege, grantees) -%}\n grant {{ privilege }} on {{ relation }} to {{ grantees | join(', ') }}\n{%- endmacro -%}\n\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.4149, "supported_languages": null}, "macro.dbt.get_revoke_sql": {"unique_id": "macro.dbt.get_revoke_sql", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_bigquery.bigquery__get_revoke_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.415099, "supported_languages": null}, "macro.dbt.default__get_revoke_sql": {"unique_id": "macro.dbt.default__get_revoke_sql", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "name": "default__get_revoke_sql", "macro_sql": "\n\n{%- macro default__get_revoke_sql(relation, privilege, grantees) -%}\n revoke {{ privilege }} on {{ relation }} from {{ grantees | join(', ') }}\n{%- endmacro -%}\n\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.4152782, "supported_languages": null}, "macro.dbt.get_dcl_statement_list": {"unique_id": "macro.dbt.get_dcl_statement_list", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__get_dcl_statement_list"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.415479, "supported_languages": null}, "macro.dbt.default__get_dcl_statement_list": {"unique_id": "macro.dbt.default__get_dcl_statement_list", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.support_multiple_grantees_per_dcl_statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.4160728, "supported_languages": null}, "macro.dbt.call_dcl_statements": {"unique_id": "macro.dbt.call_dcl_statements", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__call_dcl_statements"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.4163148, "supported_languages": null}, "macro.dbt.default__call_dcl_statements": {"unique_id": "macro.dbt.default__call_dcl_statements", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.416538, "supported_languages": null}, "macro.dbt.apply_grants": {"unique_id": "macro.dbt.apply_grants", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__apply_grants"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.416747, "supported_languages": null}, "macro.dbt.default__apply_grants": {"unique_id": "macro.dbt.default__apply_grants", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "name": "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 ~': 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 %}", "resource_type": "macro", "tags": [], "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}, "patch_path": null, "arguments": [], "created_at": 1666728757.417778, "supported_languages": null}, "macro.dbt.alter_column_comment": {"unique_id": "macro.dbt.alter_column_comment", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/persist_docs.sql", "original_file_path": "macros/adapters/persist_docs.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_bigquery.bigquery__alter_column_comment"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.418489, "supported_languages": null}, "macro.dbt.default__alter_column_comment": {"unique_id": "macro.dbt.default__alter_column_comment", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/persist_docs.sql", "original_file_path": "macros/adapters/persist_docs.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.418644, "supported_languages": null}, "macro.dbt.alter_relation_comment": {"unique_id": "macro.dbt.alter_relation_comment", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/persist_docs.sql", "original_file_path": "macros/adapters/persist_docs.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__alter_relation_comment"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.418829, "supported_languages": null}, "macro.dbt.default__alter_relation_comment": {"unique_id": "macro.dbt.default__alter_relation_comment", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/persist_docs.sql", "original_file_path": "macros/adapters/persist_docs.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.418981, "supported_languages": null}, "macro.dbt.persist_docs": {"unique_id": "macro.dbt.persist_docs", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/persist_docs.sql", "original_file_path": "macros/adapters/persist_docs.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_bigquery.bigquery__persist_docs"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.419227, "supported_languages": null}, "macro.dbt.default__persist_docs": {"unique_id": "macro.dbt.default__persist_docs", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/persist_docs.sql", "original_file_path": "macros/adapters/persist_docs.sql", "name": "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 {% do run_query(alter_column_comment(relation, model.columns)) %}\n {% endif %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.run_query", "macro.dbt.alter_relation_comment", "macro.dbt.alter_column_comment"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.4196742, "supported_languages": null}, "macro.dbt.get_catalog": {"unique_id": "macro.dbt.get_catalog", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "name": "get_catalog", "macro_sql": "{% macro get_catalog(information_schema, schemas) -%}\n {{ return(adapter.dispatch('get_catalog', 'dbt')(information_schema, schemas)) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_bigquery.bigquery__get_catalog"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.421049, "supported_languages": null}, "macro.dbt.default__get_catalog": {"unique_id": "macro.dbt.default__get_catalog", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.421282, "supported_languages": null}, "macro.dbt.information_schema_name": {"unique_id": "macro.dbt.information_schema_name", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "name": "information_schema_name", "macro_sql": "{% macro information_schema_name(database) %}\n {{ return(adapter.dispatch('information_schema_name', 'dbt')(database)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__information_schema_name"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.421452, "supported_languages": null}, "macro.dbt.default__information_schema_name": {"unique_id": "macro.dbt.default__information_schema_name", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.421588, "supported_languages": null}, "macro.dbt.list_schemas": {"unique_id": "macro.dbt.list_schemas", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "name": "list_schemas", "macro_sql": "{% macro list_schemas(database) -%}\n {{ return(adapter.dispatch('list_schemas', 'dbt')(database)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_bigquery.bigquery__list_schemas"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.421748, "supported_languages": null}, "macro.dbt.default__list_schemas": {"unique_id": "macro.dbt.default__list_schemas", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.information_schema_name", "macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.4219708, "supported_languages": null}, "macro.dbt.check_schema_exists": {"unique_id": "macro.dbt.check_schema_exists", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_bigquery.bigquery__check_schema_exists"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.422168, "supported_languages": null}, "macro.dbt.default__check_schema_exists": {"unique_id": "macro.dbt.default__check_schema_exists", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.replace", "macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.422438, "supported_languages": null}, "macro.dbt.list_relations_without_caching": {"unique_id": "macro.dbt.list_relations_without_caching", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_bigquery.bigquery__list_relations_without_caching"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.4226072, "supported_languages": null}, "macro.dbt.default__list_relations_without_caching": {"unique_id": "macro.dbt.default__list_relations_without_caching", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.4227571, "supported_languages": null}, "macro.dbt.get_columns_in_relation": {"unique_id": "macro.dbt.get_columns_in_relation", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "name": "get_columns_in_relation", "macro_sql": "{% macro get_columns_in_relation(relation) -%}\n {{ return(adapter.dispatch('get_columns_in_relation', 'dbt')(relation)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_bigquery.bigquery__get_columns_in_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.424324, "supported_languages": null}, "macro.dbt.default__get_columns_in_relation": {"unique_id": "macro.dbt.default__get_columns_in_relation", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.4245372, "supported_languages": null}, "macro.dbt.sql_convert_columns_in_relation": {"unique_id": "macro.dbt.sql_convert_columns_in_relation", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.4248161, "supported_languages": null}, "macro.dbt.get_columns_in_query": {"unique_id": "macro.dbt.get_columns_in_query", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__get_columns_in_query"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.424982, "supported_languages": null}, "macro.dbt.default__get_columns_in_query": {"unique_id": "macro.dbt.default__get_columns_in_query", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "name": "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 select * from (\n {{ select_sql }}\n ) as __dbt_sbq\n where false\n limit 0\n {% endcall %}\n\n {{ return(load_result('get_columns_in_query').table.columns | map(attribute='name') | list) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.425288, "supported_languages": null}, "macro.dbt.alter_column_type": {"unique_id": "macro.dbt.alter_column_type", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_bigquery.bigquery__alter_column_type"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.425497, "supported_languages": null}, "macro.dbt.default__alter_column_type": {"unique_id": "macro.dbt.default__alter_column_type", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "name": "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 }} add column {{ adapter.quote(tmp_column) }} {{ new_column_type }};\n update {{ relation }} set {{ adapter.quote(tmp_column) }} = {{ adapter.quote(column_name) }};\n alter table {{ relation }} drop column {{ adapter.quote(column_name) }} cascade;\n alter table {{ relation }} rename column {{ adapter.quote(tmp_column) }} to {{ adapter.quote(column_name) }}\n {% endcall %}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.426039, "supported_languages": null}, "macro.dbt.alter_relation_add_remove_columns": {"unique_id": "macro.dbt.alter_relation_add_remove_columns", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__alter_relation_add_remove_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.426275, "supported_languages": null}, "macro.dbt.default__alter_relation_add_remove_columns": {"unique_id": "macro.dbt.default__alter_relation_add_remove_columns", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "name": "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 }}\n\n {% for column in add_columns %}\n add column {{ column.name }} {{ column.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.name }}{{ ',' if not loop.last }}\n {% endfor %}\n\n {%- endset -%}\n\n {% do run_query(sql) %}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.426972, "supported_languages": null}, "macro.dbt.build_ref_function": {"unique_id": "macro.dbt.build_ref_function", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/python_model/python.sql", "original_file_path": "macros/python_model/python.sql", "name": "build_ref_function", "macro_sql": "{% macro build_ref_function(model) %}\n\n {%- set ref_dict = {} -%}\n {%- for _ref in model.refs -%}\n {%- set resolved = ref(*_ref) -%}\n {%- do ref_dict.update({_ref | join(\".\"): resolved.quote(database=False, schema=False, identifier=False) | string}) -%}\n {%- endfor -%}\n\ndef ref(*args,dbt_load_df_function):\n refs = {{ ref_dict | tojson }}\n key = \".\".join(args)\n return dbt_load_df_function(refs[key])\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.428363, "supported_languages": null}, "macro.dbt.build_source_function": {"unique_id": "macro.dbt.build_source_function", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/python_model/python.sql", "original_file_path": "macros/python_model/python.sql", "name": "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(\".\"): resolved.quote(database=False, schema=False, identifier=False) | string}) -%}\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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.428789, "supported_languages": null}, "macro.dbt.build_config_dict": {"unique_id": "macro.dbt.build_config_dict", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/python_model/python.sql", "original_file_path": "macros/python_model/python.sql", "name": "build_config_dict", "macro_sql": "{% macro build_config_dict(model) %}\n {%- set config_dict = {} -%}\n {%- for key in model.config.config_keys_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[key] -%}\n {%- do config_dict.update({key: value}) -%}\n {%- endfor -%}\nconfig_dict = {{ config_dict }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.4292, "supported_languages": null}, "macro.dbt.py_script_postfix": {"unique_id": "macro.dbt.py_script_postfix", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/python_model/python.sql", "original_file_path": "macros/python_model/python.sql", "name": "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\nclass this:\n \"\"\"dbt.this() or dbt.this.identifier\"\"\"\n database = '{{ this.database }}'\n schema = '{{ this.schema }}'\n identifier = '{{ this.identifier }}'\n def __repr__(self):\n return '{{ this }}'\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: ref(*args, 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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.build_ref_function", "macro.dbt.build_source_function", "macro.dbt.build_config_dict", "macro.dbt.is_incremental", "macro.dbt.py_script_comment"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.4295812, "supported_languages": null}, "macro.dbt.py_script_comment": {"unique_id": "macro.dbt.py_script_comment", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "macros/python_model/python.sql", "original_file_path": "macros/python_model/python.sql", "name": "py_script_comment", "macro_sql": "{%macro py_script_comment()%}\n{%endmacro%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.4296541, "supported_languages": null}, "macro.dbt.test_unique": {"unique_id": "macro.dbt.test_unique", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "tests/generic/builtin.sql", "original_file_path": "tests/generic/builtin.sql", "name": "test_unique", "macro_sql": "{% test unique(model, column_name) %}\n {% set macro = adapter.dispatch('test_unique', 'dbt') %}\n {{ macro(model, column_name) }}\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_bigquery.bigquery__test_unique"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.4302049, "supported_languages": null}, "macro.dbt.test_not_null": {"unique_id": "macro.dbt.test_not_null", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "tests/generic/builtin.sql", "original_file_path": "tests/generic/builtin.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__test_not_null"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.430422, "supported_languages": null}, "macro.dbt.test_accepted_values": {"unique_id": "macro.dbt.test_accepted_values", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "tests/generic/builtin.sql", "original_file_path": "tests/generic/builtin.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__test_accepted_values"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.430675, "supported_languages": null}, "macro.dbt.test_relationships": {"unique_id": "macro.dbt.test_relationships", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "tests/generic/builtin.sql", "original_file_path": "tests/generic/builtin.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__test_relationships"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.430915, "supported_languages": null}, "macro.dbt_utils.xdb_deprecation_warning_without_replacement": {"unique_id": "macro.dbt_utils.xdb_deprecation_warning_without_replacement", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/cross_db_utils/deprecated/xdb_deprecation_warning.sql", "original_file_path": "macros/cross_db_utils/deprecated/xdb_deprecation_warning.sql", "name": "xdb_deprecation_warning_without_replacement", "macro_sql": "{% macro xdb_deprecation_warning_without_replacement(macro, package, model) %}\n {%- set error_message = \"Warning: the `\" ~ macro ~\"` macro is deprecated and will be removed in a future version of the package, once equivalent functionality is implemented in dbt Core. The \" ~ package ~ \".\" ~ model ~ \" model triggered this warning.\" -%}\n {%- do exceptions.warn(error_message) -%}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.4312692, "supported_languages": null}, "macro.dbt_utils.get_url_host": {"unique_id": "macro.dbt_utils.get_url_host", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/web/get_url_host.sql", "original_file_path": "macros/web/get_url_host.sql", "name": "get_url_host", "macro_sql": "{% macro get_url_host(field) -%}\n {{ return(adapter.dispatch('get_url_host', 'dbt_utils')(field)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__get_url_host"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.4316218, "supported_languages": null}, "macro.dbt_utils.default__get_url_host": {"unique_id": "macro.dbt_utils.default__get_url_host", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/web/get_url_host.sql", "original_file_path": "macros/web/get_url_host.sql", "name": "default__get_url_host", "macro_sql": "{% macro default__get_url_host(field) -%}\n\n{%- set parsed =\n split_part(\n split_part(\n replace(\n replace(\n replace(field, \"'android-app://'\", \"''\"\n ), \"'http://'\", \"''\"\n ), \"'https://'\", \"''\"\n ), \"'/'\", 1\n ), \"'?'\", 1\n )\n\n-%}\n\n\n {{ dbt.safe_cast(\n parsed,\n type_string()\n )}}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "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}, "patch_path": null, "arguments": [], "created_at": 1666728757.432076, "supported_languages": null}, "macro.dbt_utils.get_url_path": {"unique_id": "macro.dbt_utils.get_url_path", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/web/get_url_path.sql", "original_file_path": "macros/web/get_url_path.sql", "name": "get_url_path", "macro_sql": "{% macro get_url_path(field) -%}\n {{ return(adapter.dispatch('get_url_path', 'dbt_utils')(field)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__get_url_path"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.432551, "supported_languages": null}, "macro.dbt_utils.default__get_url_path": {"unique_id": "macro.dbt_utils.default__get_url_path", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/web/get_url_path.sql", "original_file_path": "macros/web/get_url_path.sql", "name": "default__get_url_path", "macro_sql": "{% macro default__get_url_path(field) -%}\n\n {%- set stripped_url =\n replace(\n replace(field, \"'http://'\", \"''\"), \"'https://'\", \"''\")\n -%}\n\n {%- set first_slash_pos -%}\n coalesce(\n nullif({{ position(\"'/'\", stripped_url) }}, 0),\n {{ position(\"'?'\", stripped_url) }} - 1\n )\n {%- endset -%}\n\n {%- set parsed_path =\n split_part(\n right(\n stripped_url,\n length(stripped_url) ~ \"-\" ~ first_slash_pos\n ),\n \"'?'\", 1\n )\n -%}\n\n {{ safe_cast(\n parsed_path,\n type_string()\n )}}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "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}, "patch_path": null, "arguments": [], "created_at": 1666728757.433077, "supported_languages": null}, "macro.dbt_utils.get_url_parameter": {"unique_id": "macro.dbt_utils.get_url_parameter", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/web/get_url_parameter.sql", "original_file_path": "macros/web/get_url_parameter.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__get_url_parameter"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.433412, "supported_languages": null}, "macro.dbt_utils.default__get_url_parameter": {"unique_id": "macro.dbt_utils.default__get_url_parameter", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/web/get_url_parameter.sql", "original_file_path": "macros/web/get_url_parameter.sql", "name": "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 = split_part(split_part(field, formatted_url_parameter, 2), \"'&'\", 1) -%}\n\nnullif({{ split }},'')\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.split_part"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.433681, "supported_languages": null}, "macro.dbt_utils.test_fewer_rows_than": {"unique_id": "macro.dbt_utils.test_fewer_rows_than", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/fewer_rows_than.sql", "original_file_path": "macros/generic_tests/fewer_rows_than.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_fewer_rows_than"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.4346938, "supported_languages": null}, "macro.dbt_utils.default__test_fewer_rows_than": {"unique_id": "macro.dbt_utils.default__test_fewer_rows_than", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/fewer_rows_than.sql", "original_file_path": "macros/generic_tests/fewer_rows_than.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.435605, "supported_languages": null}, "macro.dbt_utils.test_equal_rowcount": {"unique_id": "macro.dbt_utils.test_equal_rowcount", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/equal_rowcount.sql", "original_file_path": "macros/generic_tests/equal_rowcount.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_equal_rowcount"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.4364429, "supported_languages": null}, "macro.dbt_utils.default__test_equal_rowcount": {"unique_id": "macro.dbt_utils.default__test_equal_rowcount", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/equal_rowcount.sql", "original_file_path": "macros/generic_tests/equal_rowcount.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.437394, "supported_languages": null}, "macro.dbt_utils.test_relationships_where": {"unique_id": "macro.dbt_utils.test_relationships_where", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/relationships_where.sql", "original_file_path": "macros/generic_tests/relationships_where.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_relationships_where"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.438069, "supported_languages": null}, "macro.dbt_utils.default__test_relationships_where": {"unique_id": "macro.dbt_utils.default__test_relationships_where", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/relationships_where.sql", "original_file_path": "macros/generic_tests/relationships_where.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.438386, "supported_languages": null}, "macro.dbt_utils.test_recency": {"unique_id": "macro.dbt_utils.test_recency", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/recency.sql", "original_file_path": "macros/generic_tests/recency.sql", "name": "test_recency", "macro_sql": "{% test recency(model, field, datepart, interval, group_by_columns = []) %}\n {{ return(adapter.dispatch('test_recency', 'dbt_utils')(model, field, datepart, interval, group_by_columns)) }}\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_recency"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.438957, "supported_languages": null}, "macro.dbt_utils.default__test_recency": {"unique_id": "macro.dbt_utils.default__test_recency", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/recency.sql", "original_file_path": "macros/generic_tests/recency.sql", "name": "default__test_recency", "macro_sql": "{% macro default__test_recency(model, field, datepart, interval, group_by_columns) %}\n\n{% set threshold = dateadd(datepart, interval * -1, current_timestamp_backcompat()) %}\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 max({{field}}) as most_recent\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\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.dateadd", "macro.dbt.current_timestamp_backcompat"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.439508, "supported_languages": null}, "macro.dbt_utils.test_not_constant": {"unique_id": "macro.dbt_utils.test_not_constant", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/not_constant.sql", "original_file_path": "macros/generic_tests/not_constant.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_not_constant"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.4399722, "supported_languages": null}, "macro.dbt_utils.default__test_not_constant": {"unique_id": "macro.dbt_utils.default__test_not_constant", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/not_constant.sql", "original_file_path": "macros/generic_tests/not_constant.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.440377, "supported_languages": null}, "macro.dbt_utils.test_accepted_range": {"unique_id": "macro.dbt_utils.test_accepted_range", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/accepted_range.sql", "original_file_path": "macros/generic_tests/accepted_range.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_accepted_range"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.440963, "supported_languages": null}, "macro.dbt_utils.default__test_accepted_range": {"unique_id": "macro.dbt_utils.default__test_accepted_range", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/accepted_range.sql", "original_file_path": "macros/generic_tests/accepted_range.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.441374, "supported_languages": null}, "macro.dbt_utils.test_not_accepted_values": {"unique_id": "macro.dbt_utils.test_not_accepted_values", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/not_accepted_values.sql", "original_file_path": "macros/generic_tests/not_accepted_values.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_not_accepted_values"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.441896, "supported_languages": null}, "macro.dbt_utils.default__test_not_accepted_values": {"unique_id": "macro.dbt_utils.default__test_not_accepted_values", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/not_accepted_values.sql", "original_file_path": "macros/generic_tests/not_accepted_values.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.442297, "supported_languages": null}, "macro.dbt_utils.test_at_least_one": {"unique_id": "macro.dbt_utils.test_at_least_one", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/at_least_one.sql", "original_file_path": "macros/generic_tests/at_least_one.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_at_least_one"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.442754, "supported_languages": null}, "macro.dbt_utils.default__test_at_least_one": {"unique_id": "macro.dbt_utils.default__test_at_least_one", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/at_least_one.sql", "original_file_path": "macros/generic_tests/at_least_one.sql", "name": "default__test_at_least_one", "macro_sql": "{% macro default__test_at_least_one(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\nselect *\nfrom (\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 {{ model }}\n\n {{groupby_gb_cols}}\n\n having count({{ column_name }}) = 0\n\n) validation_errors\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.4431639, "supported_languages": null}, "macro.dbt_utils.test_unique_combination_of_columns": {"unique_id": "macro.dbt_utils.test_unique_combination_of_columns", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/unique_combination_of_columns.sql", "original_file_path": "macros/generic_tests/unique_combination_of_columns.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_unique_combination_of_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.443764, "supported_languages": null}, "macro.dbt_utils.default__test_unique_combination_of_columns": {"unique_id": "macro.dbt_utils.default__test_unique_combination_of_columns", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/unique_combination_of_columns.sql", "original_file_path": "macros/generic_tests/unique_combination_of_columns.sql", "name": "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 {% set column_list = 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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.444337, "supported_languages": null}, "macro.dbt_utils.test_cardinality_equality": {"unique_id": "macro.dbt_utils.test_cardinality_equality", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/cardinality_equality.sql", "original_file_path": "macros/generic_tests/cardinality_equality.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_cardinality_equality"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.4449012, "supported_languages": null}, "macro.dbt_utils.default__test_cardinality_equality": {"unique_id": "macro.dbt_utils.default__test_cardinality_equality", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/cardinality_equality.sql", "original_file_path": "macros/generic_tests/cardinality_equality.sql", "name": "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 {{ except() }}\n select *\n from table_b\n),\n\nexcept_b as (\n select *\n from table_b\n {{ 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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.except"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.445194, "supported_languages": null}, "macro.dbt_utils.test_expression_is_true": {"unique_id": "macro.dbt_utils.test_expression_is_true", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/expression_is_true.sql", "original_file_path": "macros/generic_tests/expression_is_true.sql", "name": "test_expression_is_true", "macro_sql": "{% test expression_is_true(model, expression, column_name=None, condition='1=1') %}\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 {{ return(adapter.dispatch('test_expression_is_true', 'dbt_utils')(model, expression, column_name, condition)) }}\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_expression_is_true"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.4456818, "supported_languages": null}, "macro.dbt_utils.default__test_expression_is_true": {"unique_id": "macro.dbt_utils.default__test_expression_is_true", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/expression_is_true.sql", "original_file_path": "macros/generic_tests/expression_is_true.sql", "name": "default__test_expression_is_true", "macro_sql": "{% macro default__test_expression_is_true(model, expression, column_name, condition) %}\n\n{% set column_list = '*' if should_store_failures() else \"1\" %}\n\nwith meet_condition as (\n select * from {{ model }} where {{ condition }}\n)\n\nselect\n {{ column_list }}\nfrom meet_condition\n{% if column_name is none %}\nwhere not({{ expression }})\n{%- else %}\nwhere not({{ column_name }} {{ expression }})\n{%- endif %}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.should_store_failures"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.446028, "supported_languages": null}, "macro.dbt_utils.test_not_null_proportion": {"unique_id": "macro.dbt_utils.test_not_null_proportion", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/not_null_proportion.sql", "original_file_path": "macros/generic_tests/not_null_proportion.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_not_null_proportion"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.446649, "supported_languages": null}, "macro.dbt_utils.default__test_not_null_proportion": {"unique_id": "macro.dbt_utils.default__test_not_null_proportion", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/not_null_proportion.sql", "original_file_path": "macros/generic_tests/not_null_proportion.sql", "name": "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 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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.447374, "supported_languages": null}, "macro.dbt_utils.test_sequential_values": {"unique_id": "macro.dbt_utils.test_sequential_values", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/sequential_values.sql", "original_file_path": "macros/generic_tests/sequential_values.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_sequential_values"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.44821, "supported_languages": null}, "macro.dbt_utils.default__test_sequential_values": {"unique_id": "macro.dbt_utils.default__test_sequential_values", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/sequential_values.sql", "original_file_path": "macros/generic_tests/sequential_values.sql", "name": "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 {{ type_timestamp() }})= cast({{ dateadd(datepart, interval, previous_column_name) }} as {{ type_timestamp() }}))\n {% else %}\n where not({{ column_name }} = {{ previous_column_name }} + {{ interval }})\n {% endif %}\n)\n\nselect *\nfrom validation_errors\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.slugify", "macro.dbt.type_timestamp", "macro.dbt.dateadd"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.4489741, "supported_languages": null}, "macro.dbt_utils.test_equality": {"unique_id": "macro.dbt_utils.test_equality", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/equality.sql", "original_file_path": "macros/generic_tests/equality.sql", "name": "test_equality", "macro_sql": "{% test equality(model, compare_model, compare_columns=None) %}\n {{ return(adapter.dispatch('test_equality', 'dbt_utils')(model, compare_model, compare_columns)) }}\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_equality"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.4496698, "supported_languages": null}, "macro.dbt_utils.default__test_equality": {"unique_id": "macro.dbt_utils.default__test_equality", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/equality.sql", "original_file_path": "macros/generic_tests/equality.sql", "name": "default__test_equality", "macro_sql": "{% macro default__test_equality(model, compare_model, compare_columns=None) %}\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-- setup\n{%- do dbt_utils._is_relation(model, 'test_equality') -%}\n\n{#-\nIf the compare_cols arg is provided, we can run this test without querying the\ninformation schema\u00a0\u2014 this allows the model to be an ephemeral model\n-#}\n\n{%- if not compare_columns -%}\n {%- do dbt_utils._is_ephemeral(model, 'test_equality') -%}\n {%- set compare_columns = adapter.get_columns_in_relation(model) | map(attribute='quoted') -%}\n{%- endif -%}\n\n{% set compare_cols_csv = compare_columns | join(', ') %}\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 {{ except() }}\n select {{compare_cols_csv}} from b\n\n),\n\nb_minus_a as (\n\n select {{compare_cols_csv}} from b\n {{ 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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils._is_relation", "macro.dbt_utils._is_ephemeral", "macro.dbt.except"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.450428, "supported_languages": null}, "macro.dbt_utils.test_not_empty_string": {"unique_id": "macro.dbt_utils.test_not_empty_string", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/not_empty_string.sql", "original_file_path": "macros/generic_tests/not_empty_string.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_not_empty_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.450918, "supported_languages": null}, "macro.dbt_utils.default__test_not_empty_string": {"unique_id": "macro.dbt_utils.default__test_not_empty_string", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/not_empty_string.sql", "original_file_path": "macros/generic_tests/not_empty_string.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.4511812, "supported_languages": null}, "macro.dbt_utils.test_mutually_exclusive_ranges": {"unique_id": "macro.dbt_utils.test_mutually_exclusive_ranges", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/mutually_exclusive_ranges.sql", "original_file_path": "macros/generic_tests/mutually_exclusive_ranges.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_mutually_exclusive_ranges"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.45419, "supported_languages": null}, "macro.dbt_utils.default__test_mutually_exclusive_ranges": {"unique_id": "macro.dbt_utils.default__test_mutually_exclusive_ranges", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/mutually_exclusive_ranges.sql", "original_file_path": "macros/generic_tests/mutually_exclusive_ranges.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.455599, "supported_languages": null}, "macro.dbt_utils.pretty_log_format": {"unique_id": "macro.dbt_utils.pretty_log_format", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/jinja_helpers/pretty_log_format.sql", "original_file_path": "macros/jinja_helpers/pretty_log_format.sql", "name": "pretty_log_format", "macro_sql": "{% macro pretty_log_format(message) %}\n {{ return(adapter.dispatch('pretty_log_format', 'dbt_utils')(message)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__pretty_log_format"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.4558961, "supported_languages": null}, "macro.dbt_utils.default__pretty_log_format": {"unique_id": "macro.dbt_utils.default__pretty_log_format", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/jinja_helpers/pretty_log_format.sql", "original_file_path": "macros/jinja_helpers/pretty_log_format.sql", "name": "default__pretty_log_format", "macro_sql": "{% macro default__pretty_log_format(message) %}\n {{ return( dbt_utils.pretty_time() ~ ' + ' ~ message) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.pretty_time"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.456044, "supported_languages": null}, "macro.dbt_utils._is_relation": {"unique_id": "macro.dbt_utils._is_relation", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/jinja_helpers/_is_relation.sql", "original_file_path": "macros/jinja_helpers/_is_relation.sql", "name": "_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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.456491, "supported_languages": null}, "macro.dbt_utils.pretty_time": {"unique_id": "macro.dbt_utils.pretty_time", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/jinja_helpers/pretty_time.sql", "original_file_path": "macros/jinja_helpers/pretty_time.sql", "name": "pretty_time", "macro_sql": "{% macro pretty_time(format='%H:%M:%S') %}\n {{ return(adapter.dispatch('pretty_time', 'dbt_utils')(format)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__pretty_time"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.4568, "supported_languages": null}, "macro.dbt_utils.default__pretty_time": {"unique_id": "macro.dbt_utils.default__pretty_time", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/jinja_helpers/pretty_time.sql", "original_file_path": "macros/jinja_helpers/pretty_time.sql", "name": "default__pretty_time", "macro_sql": "{% macro default__pretty_time(format='%H:%M:%S') %}\n {{ return(modules.datetime.datetime.now().strftime(format)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.456974, "supported_languages": null}, "macro.dbt_utils.log_info": {"unique_id": "macro.dbt_utils.log_info", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/jinja_helpers/log_info.sql", "original_file_path": "macros/jinja_helpers/log_info.sql", "name": "log_info", "macro_sql": "{% macro log_info(message) %}\n {{ return(adapter.dispatch('log_info', 'dbt_utils')(message)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__log_info"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.457249, "supported_languages": null}, "macro.dbt_utils.default__log_info": {"unique_id": "macro.dbt_utils.default__log_info", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/jinja_helpers/log_info.sql", "original_file_path": "macros/jinja_helpers/log_info.sql", "name": "default__log_info", "macro_sql": "{% macro default__log_info(message) %}\n {{ log(dbt_utils.pretty_log_format(message), info=True) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.pretty_log_format"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.457401, "supported_languages": null}, "macro.dbt_utils.slugify": {"unique_id": "macro.dbt_utils.slugify", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/jinja_helpers/slugify.sql", "original_file_path": "macros/jinja_helpers/slugify.sql", "name": "slugify", "macro_sql": "{% macro slugify(string) %}\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\n{{ return(string) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.457864, "supported_languages": null}, "macro.dbt_utils._is_ephemeral": {"unique_id": "macro.dbt_utils._is_ephemeral", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/jinja_helpers/_is_ephemeral.sql", "original_file_path": "macros/jinja_helpers/_is_ephemeral.sql", "name": "_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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.458633, "supported_languages": null}, "macro.dbt_utils.get_intervals_between": {"unique_id": "macro.dbt_utils.get_intervals_between", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/date_spine.sql", "original_file_path": "macros/sql/date_spine.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__get_intervals_between"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.459323, "supported_languages": null}, "macro.dbt_utils.default__get_intervals_between": {"unique_id": "macro.dbt_utils.default__get_intervals_between", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/date_spine.sql", "original_file_path": "macros/sql/date_spine.sql", "name": "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 {{ 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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement", "macro.dbt.datediff"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.4598432, "supported_languages": null}, "macro.dbt_utils.date_spine": {"unique_id": "macro.dbt_utils.date_spine", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/date_spine.sql", "original_file_path": "macros/sql/date_spine.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__date_spine"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.460046, "supported_languages": null}, "macro.dbt_utils.default__date_spine": {"unique_id": "macro.dbt_utils.default__date_spine", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/date_spine.sql", "original_file_path": "macros/sql/date_spine.sql", "name": "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 \"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 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\nfiltered as (\n\n select *\n from all_periods\n where date_{{datepart}} <= {{ end_date }}\n\n)\n\nselect * from filtered\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "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}, "patch_path": null, "arguments": [], "created_at": 1666728757.4603531, "supported_languages": null}, "macro.dbt_utils.nullcheck_table": {"unique_id": "macro.dbt_utils.nullcheck_table", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/nullcheck_table.sql", "original_file_path": "macros/sql/nullcheck_table.sql", "name": "nullcheck_table", "macro_sql": "{% macro nullcheck_table(relation) %}\n {{ return(adapter.dispatch('nullcheck_table', 'dbt_utils')(relation)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__nullcheck_table"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.4606788, "supported_languages": null}, "macro.dbt_utils.default__nullcheck_table": {"unique_id": "macro.dbt_utils.default__nullcheck_table", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/nullcheck_table.sql", "original_file_path": "macros/sql/nullcheck_table.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "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}, "patch_path": null, "arguments": [], "created_at": 1666728757.4609768, "supported_languages": null}, "macro.dbt_utils.get_relations_by_pattern": {"unique_id": "macro.dbt_utils.get_relations_by_pattern", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/get_relations_by_pattern.sql", "original_file_path": "macros/sql/get_relations_by_pattern.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__get_relations_by_pattern"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.461609, "supported_languages": null}, "macro.dbt_utils.default__get_relations_by_pattern": {"unique_id": "macro.dbt_utils.default__get_relations_by_pattern", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/get_relations_by_pattern.sql", "original_file_path": "macros/sql/get_relations_by_pattern.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement", "macro.dbt_utils.get_tables_by_pattern_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.462411, "supported_languages": null}, "macro.dbt_utils.get_powers_of_two": {"unique_id": "macro.dbt_utils.get_powers_of_two", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/generate_series.sql", "original_file_path": "macros/sql/generate_series.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__get_powers_of_two"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.463187, "supported_languages": null}, "macro.dbt_utils.default__get_powers_of_two": {"unique_id": "macro.dbt_utils.default__get_powers_of_two", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/generate_series.sql", "original_file_path": "macros/sql/generate_series.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.463552, "supported_languages": null}, "macro.dbt_utils.generate_series": {"unique_id": "macro.dbt_utils.generate_series", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/generate_series.sql", "original_file_path": "macros/sql/generate_series.sql", "name": "generate_series", "macro_sql": "{% macro generate_series(upper_bound) %}\n {{ return(adapter.dispatch('generate_series', 'dbt_utils')(upper_bound)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__generate_series"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.463718, "supported_languages": null}, "macro.dbt_utils.default__generate_series": {"unique_id": "macro.dbt_utils.default__generate_series", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/generate_series.sql", "original_file_path": "macros/sql/generate_series.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.get_powers_of_two"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.464163, "supported_languages": null}, "macro.dbt_utils.get_relations_by_prefix": {"unique_id": "macro.dbt_utils.get_relations_by_prefix", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/get_relations_by_prefix.sql", "original_file_path": "macros/sql/get_relations_by_prefix.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__get_relations_by_prefix"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.464787, "supported_languages": null}, "macro.dbt_utils.default__get_relations_by_prefix": {"unique_id": "macro.dbt_utils.default__get_relations_by_prefix", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/get_relations_by_prefix.sql", "original_file_path": "macros/sql/get_relations_by_prefix.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement", "macro.dbt_utils.get_tables_by_prefix_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.4655411, "supported_languages": null}, "macro.dbt_utils.get_tables_by_prefix_sql": {"unique_id": "macro.dbt_utils.get_tables_by_prefix_sql", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/get_tables_by_prefix_sql.sql", "original_file_path": "macros/sql/get_tables_by_prefix_sql.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__get_tables_by_prefix_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.4659462, "supported_languages": null}, "macro.dbt_utils.default__get_tables_by_prefix_sql": {"unique_id": "macro.dbt_utils.default__get_tables_by_prefix_sql", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/get_tables_by_prefix_sql.sql", "original_file_path": "macros/sql/get_tables_by_prefix_sql.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.get_tables_by_pattern_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.466199, "supported_languages": null}, "macro.dbt_utils.star": {"unique_id": "macro.dbt_utils.star", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/star.sql", "original_file_path": "macros/sql/star.sql", "name": "star", "macro_sql": "{% macro star(from, relation_alias=False, except=[], prefix='', suffix='') -%}\n {{ return(adapter.dispatch('star', 'dbt_utils')(from, relation_alias, except, prefix, suffix)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__star"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.466843, "supported_languages": null}, "macro.dbt_utils.default__star": {"unique_id": "macro.dbt_utils.default__star", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/star.sql", "original_file_path": "macros/sql/star.sql", "name": "default__star", "macro_sql": "{% macro default__star(from, relation_alias=False, except=[], prefix='', suffix='') -%}\n {%- do dbt_utils._is_relation(from, 'star') -%}\n {%- do dbt_utils._is_ephemeral(from, 'star') -%}\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 cols = dbt_utils.get_filtered_columns_in_relation(from, except) %}\n\n {%- if cols|length <= 0 -%}\n {{- return('*') -}}\n {%- else -%}\n {%- for col in cols %}\n {%- if relation_alias %}{{ relation_alias }}.{% else %}{%- endif -%}{{ adapter.quote(col)|trim }} {%- if prefix!='' or suffix!='' %} as {{ adapter.quote(prefix ~ col ~ suffix)|trim }} {%- endif -%}\n {%- if not loop.last %},{{ '\\n ' }}{% endif %}\n {%- endfor -%}\n {% endif %}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "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}, "patch_path": null, "arguments": [], "created_at": 1666728757.4677079, "supported_languages": null}, "macro.dbt_utils.unpivot": {"unique_id": "macro.dbt_utils.unpivot", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/unpivot.sql", "original_file_path": "macros/sql/unpivot.sql", "name": "unpivot", "macro_sql": "{% macro unpivot(relation=none, cast_to='varchar', exclude=none, remove=none, field_name='field_name', value_name='value') -%}\n {{ return(adapter.dispatch('unpivot', 'dbt_utils')(relation, cast_to, exclude, remove, field_name, value_name)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__unpivot"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.468877, "supported_languages": null}, "macro.dbt_utils.default__unpivot": {"unique_id": "macro.dbt_utils.default__unpivot", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/unpivot.sql", "original_file_path": "macros/sql/unpivot.sql", "name": "default__unpivot", "macro_sql": "{% macro default__unpivot(relation=none, cast_to='varchar', exclude=none, remove=none, field_name='field_name', value_name='value') -%}\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 select\n {%- for exclude_col in exclude %}\n {{ exclude_col }},\n {%- endfor %}\n\n cast('{{ col.column }}' as {{ type_string() }}) as {{ field_name }},\n cast( {% if col.data_type == 'boolean' %}\n {{ cast_bool_to_text(col.column) }}\n {% else %}\n {{ col.column }}\n {% endif %}\n as {{ cast_to }}) as {{ value_name }}\n\n from {{ relation }}\n\n {% if not loop.last -%}\n union all\n {% endif -%}\n {%- endfor -%}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "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}, "patch_path": null, "arguments": [], "created_at": 1666728757.4704719, "supported_languages": null}, "macro.dbt_utils.union_relations": {"unique_id": "macro.dbt_utils.union_relations", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/union.sql", "original_file_path": "macros/sql/union.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__union_relations"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.4731672, "supported_languages": null}, "macro.dbt_utils.default__union_relations": {"unique_id": "macro.dbt_utils.default__union_relations", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/union.sql", "original_file_path": "macros/sql/union.sql", "name": "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({{ string_literal(relation) }} as {{ 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 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 -%}", "resource_type": "macro", "tags": [], "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}, "patch_path": null, "arguments": [], "created_at": 1666728757.476178, "supported_languages": null}, "macro.dbt_utils.group_by": {"unique_id": "macro.dbt_utils.group_by", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/groupby.sql", "original_file_path": "macros/sql/groupby.sql", "name": "group_by", "macro_sql": "{%- macro group_by(n) -%}\n {{ return(adapter.dispatch('group_by', 'dbt_utils')(n)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__group_by"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.4765, "supported_languages": null}, "macro.dbt_utils.default__group_by": {"unique_id": "macro.dbt_utils.default__group_by", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/groupby.sql", "original_file_path": "macros/sql/groupby.sql", "name": "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 -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.4767208, "supported_languages": null}, "macro.dbt_utils.deduplicate": {"unique_id": "macro.dbt_utils.deduplicate", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/deduplicate.sql", "original_file_path": "macros/sql/deduplicate.sql", "name": "deduplicate", "macro_sql": "{%- macro deduplicate(relation, partition_by, order_by) -%}\n {{ return(adapter.dispatch('deduplicate', 'dbt_utils')(relation, partition_by, order_by)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.bigquery__deduplicate"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.4774568, "supported_languages": null}, "macro.dbt_utils.default__deduplicate": {"unique_id": "macro.dbt_utils.default__deduplicate", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/deduplicate.sql", "original_file_path": "macros/sql/deduplicate.sql", "name": "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", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.477652, "supported_languages": null}, "macro.dbt_utils.redshift__deduplicate": {"unique_id": "macro.dbt_utils.redshift__deduplicate", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/deduplicate.sql", "original_file_path": "macros/sql/deduplicate.sql", "name": "redshift__deduplicate", "macro_sql": "{% macro redshift__deduplicate(relation, partition_by, order_by) -%}\n\n {{ return(dbt_utils.default__deduplicate(relation, partition_by, order_by=order_by)) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__deduplicate"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.477827, "supported_languages": null}, "macro.dbt_utils.postgres__deduplicate": {"unique_id": "macro.dbt_utils.postgres__deduplicate", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/deduplicate.sql", "original_file_path": "macros/sql/deduplicate.sql", "name": "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", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.477997, "supported_languages": null}, "macro.dbt_utils.snowflake__deduplicate": {"unique_id": "macro.dbt_utils.snowflake__deduplicate", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/deduplicate.sql", "original_file_path": "macros/sql/deduplicate.sql", "name": "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", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.478143, "supported_languages": null}, "macro.dbt_utils.bigquery__deduplicate": {"unique_id": "macro.dbt_utils.bigquery__deduplicate", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/deduplicate.sql", "original_file_path": "macros/sql/deduplicate.sql", "name": "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 -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.4782941, "supported_languages": null}, "macro.dbt_utils.surrogate_key": {"unique_id": "macro.dbt_utils.surrogate_key", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/surrogate_key.sql", "original_file_path": "macros/sql/surrogate_key.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__surrogate_key"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.478693, "supported_languages": null}, "macro.dbt_utils.default__surrogate_key": {"unique_id": "macro.dbt_utils.default__surrogate_key", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/surrogate_key.sql", "original_file_path": "macros/sql/surrogate_key.sql", "name": "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 variable scoped to the dbt_utils package 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 -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.4789052, "supported_languages": null}, "macro.dbt_utils.safe_add": {"unique_id": "macro.dbt_utils.safe_add", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/safe_add.sql", "original_file_path": "macros/sql/safe_add.sql", "name": "safe_add", "macro_sql": "{%- macro safe_add(field_list) -%}\n {{ return(adapter.dispatch('safe_add', 'dbt_utils')(field_list)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__safe_add"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.47929, "supported_languages": null}, "macro.dbt_utils.default__safe_add": {"unique_id": "macro.dbt_utils.default__safe_add", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/safe_add.sql", "original_file_path": "macros/sql/safe_add.sql", "name": "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 -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.479769, "supported_languages": null}, "macro.dbt_utils.nullcheck": {"unique_id": "macro.dbt_utils.nullcheck", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/nullcheck.sql", "original_file_path": "macros/sql/nullcheck.sql", "name": "nullcheck", "macro_sql": "{% macro nullcheck(cols) %}\n {{ return(adapter.dispatch('nullcheck', 'dbt_utils')(cols)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__nullcheck"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.480119, "supported_languages": null}, "macro.dbt_utils.default__nullcheck": {"unique_id": "macro.dbt_utils.default__nullcheck", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/nullcheck.sql", "original_file_path": "macros/sql/nullcheck.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.4804091, "supported_languages": null}, "macro.dbt_utils.get_tables_by_pattern_sql": {"unique_id": "macro.dbt_utils.get_tables_by_pattern_sql", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/get_tables_by_pattern_sql.sql", "original_file_path": "macros/sql/get_tables_by_pattern_sql.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.bigquery__get_tables_by_pattern_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.4818718, "supported_languages": null}, "macro.dbt_utils.default__get_tables_by_pattern_sql": {"unique_id": "macro.dbt_utils.default__get_tables_by_pattern_sql", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/get_tables_by_pattern_sql.sql", "original_file_path": "macros/sql/get_tables_by_pattern_sql.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.get_table_types_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.4821901, "supported_languages": null}, "macro.dbt_utils.bigquery__get_tables_by_pattern_sql": {"unique_id": "macro.dbt_utils.bigquery__get_tables_by_pattern_sql", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/get_tables_by_pattern_sql.sql", "original_file_path": "macros/sql/get_tables_by_pattern_sql.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "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}, "patch_path": null, "arguments": [], "created_at": 1666728757.4828742, "supported_languages": null}, "macro.dbt_utils._bigquery__get_matching_schemata": {"unique_id": "macro.dbt_utils._bigquery__get_matching_schemata", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/get_tables_by_pattern_sql.sql", "original_file_path": "macros/sql/get_tables_by_pattern_sql.sql", "name": "_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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.483327, "supported_languages": null}, "macro.dbt_utils.get_column_values": {"unique_id": "macro.dbt_utils.get_column_values", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/get_column_values.sql", "original_file_path": "macros/sql/get_column_values.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__get_column_values"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.4843361, "supported_languages": null}, "macro.dbt_utils.default__get_column_values": {"unique_id": "macro.dbt_utils.default__get_column_values", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/get_column_values.sql", "original_file_path": "macros/sql/get_column_values.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils._is_ephemeral", "macro.dbt.load_relation", "macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.485663, "supported_languages": null}, "macro.dbt_utils.pivot": {"unique_id": "macro.dbt_utils.pivot", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/pivot.sql", "original_file_path": "macros/sql/pivot.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__pivot"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.486635, "supported_languages": null}, "macro.dbt_utils.default__pivot": {"unique_id": "macro.dbt_utils.default__pivot", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/pivot.sql", "original_file_path": "macros/sql/pivot.sql", "name": "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 }} '{{ 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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.escape_single_quotes", "macro.dbt_utils.slugify"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.48737, "supported_languages": null}, "macro.dbt_utils.get_filtered_columns_in_relation": {"unique_id": "macro.dbt_utils.get_filtered_columns_in_relation", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/get_filtered_columns_in_relation.sql", "original_file_path": "macros/sql/get_filtered_columns_in_relation.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__get_filtered_columns_in_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.487833, "supported_languages": null}, "macro.dbt_utils.default__get_filtered_columns_in_relation": {"unique_id": "macro.dbt_utils.default__get_filtered_columns_in_relation", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/get_filtered_columns_in_relation.sql", "original_file_path": "macros/sql/get_filtered_columns_in_relation.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils._is_relation", "macro.dbt_utils._is_ephemeral"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.488469, "supported_languages": null}, "macro.dbt_utils.width_bucket": {"unique_id": "macro.dbt_utils.width_bucket", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/width_bucket.sql", "original_file_path": "macros/sql/width_bucket.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__width_bucket"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.4897652, "supported_languages": null}, "macro.dbt_utils.default__width_bucket": {"unique_id": "macro.dbt_utils.default__width_bucket", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/width_bucket.sql", "original_file_path": "macros/sql/width_bucket.sql", "name": "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, type_numeric() ) }},\n {{ dbt.safe_cast(bin_size, 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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.safe_cast", "macro.dbt.type_numeric"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.490158, "supported_languages": null}, "macro.dbt_utils.redshift__width_bucket": {"unique_id": "macro.dbt_utils.redshift__width_bucket", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/width_bucket.sql", "original_file_path": "macros/sql/width_bucket.sql", "name": "redshift__width_bucket", "macro_sql": "{% macro redshift__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 exactly at the bucket edge\n case\n when\n {{ dbt.safe_cast(expr, type_numeric() ) }} %\n {{ dbt.safe_cast(bin_size, 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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.safe_cast", "macro.dbt.type_numeric"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.490547, "supported_languages": null}, "macro.dbt_utils.snowflake__width_bucket": {"unique_id": "macro.dbt_utils.snowflake__width_bucket", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/width_bucket.sql", "original_file_path": "macros/sql/width_bucket.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.4907131, "supported_languages": null}, "macro.dbt_utils.get_query_results_as_dict": {"unique_id": "macro.dbt_utils.get_query_results_as_dict", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/get_query_results_as_dict.sql", "original_file_path": "macros/sql/get_query_results_as_dict.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__get_query_results_as_dict"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.491102, "supported_languages": null}, "macro.dbt_utils.default__get_query_results_as_dict": {"unique_id": "macro.dbt_utils.default__get_query_results_as_dict", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/get_query_results_as_dict.sql", "original_file_path": "macros/sql/get_query_results_as_dict.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.49162, "supported_languages": null}, "macro.dbt_utils.generate_surrogate_key": {"unique_id": "macro.dbt_utils.generate_surrogate_key", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/generate_surrogate_key.sql", "original_file_path": "macros/sql/generate_surrogate_key.sql", "name": "generate_surrogate_key", "macro_sql": "{%- macro generate_surrogate_key(field_list) -%}\n {{ return(adapter.dispatch('generate_surrogate_key', 'dbt_utils')(field_list)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__generate_surrogate_key"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.492067, "supported_languages": null}, "macro.dbt_utils.default__generate_surrogate_key": {"unique_id": "macro.dbt_utils.default__generate_surrogate_key", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/generate_surrogate_key.sql", "original_file_path": "macros/sql/generate_surrogate_key.sql", "name": "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 \" ~ type_string() ~ \"), '\" ~ default_null_value ~\"')\"\n ) -%}\n\n {%- if not loop.last %}\n {%- do fields.append(\"'-'\") -%}\n {%- endif -%}\n\n{%- endfor -%}\n\n{{ hash(concat(fields)) }}\n\n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.type_string", "macro.dbt.hash", "macro.dbt.concat"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.4926238, "supported_languages": null}, "macro.dbt_utils.get_table_types_sql": {"unique_id": "macro.dbt_utils.get_table_types_sql", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/get_table_types_sql.sql", "original_file_path": "macros/sql/get_table_types_sql.sql", "name": "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", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__get_table_types_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.493014, "supported_languages": null}, "macro.dbt_utils.default__get_table_types_sql": {"unique_id": "macro.dbt_utils.default__get_table_types_sql", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/get_table_types_sql.sql", "original_file_path": "macros/sql/get_table_types_sql.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.493144, "supported_languages": null}, "macro.dbt_utils.postgres__get_table_types_sql": {"unique_id": "macro.dbt_utils.postgres__get_table_types_sql", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/get_table_types_sql.sql", "original_file_path": "macros/sql/get_table_types_sql.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.493263, "supported_languages": null}, "macro.dbt_utils.degrees_to_radians": {"unique_id": "macro.dbt_utils.degrees_to_radians", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/haversine_distance.sql", "original_file_path": "macros/sql/haversine_distance.sql", "name": "degrees_to_radians", "macro_sql": "{% macro degrees_to_radians(degrees) -%}\n acos(-1) * {{degrees}} / 180\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.4942532, "supported_languages": null}, "macro.dbt_utils.haversine_distance": {"unique_id": "macro.dbt_utils.haversine_distance", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/haversine_distance.sql", "original_file_path": "macros/sql/haversine_distance.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.bigquery__haversine_distance"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.494564, "supported_languages": null}, "macro.dbt_utils.default__haversine_distance": {"unique_id": "macro.dbt_utils.default__haversine_distance", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/haversine_distance.sql", "original_file_path": "macros/sql/haversine_distance.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.496083, "supported_languages": null}, "macro.dbt_utils.bigquery__haversine_distance": {"unique_id": "macro.dbt_utils.bigquery__haversine_distance", "package_name": "dbt_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/haversine_distance.sql", "original_file_path": "macros/sql/haversine_distance.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.degrees_to_radians"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.496792, "supported_languages": null}, "macro.spark_utils.get_tables": {"unique_id": "macro.spark_utils.get_tables", "package_name": "spark_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/spark_utils", "path": "macros/maintenance_operation.sql", "original_file_path": "macros/maintenance_operation.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.501293, "supported_languages": null}, "macro.spark_utils.get_delta_tables": {"unique_id": "macro.spark_utils.get_delta_tables", "package_name": "spark_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/spark_utils", "path": "macros/maintenance_operation.sql", "original_file_path": "macros/maintenance_operation.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.spark_utils.get_tables", "macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.501903, "supported_languages": null}, "macro.spark_utils.get_statistic_columns": {"unique_id": "macro.spark_utils.get_statistic_columns", "package_name": "spark_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/spark_utils", "path": "macros/maintenance_operation.sql", "original_file_path": "macros/maintenance_operation.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.502676, "supported_languages": null}, "macro.spark_utils.spark_optimize_delta_tables": {"unique_id": "macro.spark_utils.spark_optimize_delta_tables", "package_name": "spark_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/spark_utils", "path": "macros/maintenance_operation.sql", "original_file_path": "macros/maintenance_operation.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "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}, "patch_path": null, "arguments": [], "created_at": 1666728757.5033312, "supported_languages": null}, "macro.spark_utils.spark_vacuum_delta_tables": {"unique_id": "macro.spark_utils.spark_vacuum_delta_tables", "package_name": "spark_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/spark_utils", "path": "macros/maintenance_operation.sql", "original_file_path": "macros/maintenance_operation.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "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}, "patch_path": null, "arguments": [], "created_at": 1666728757.503974, "supported_languages": null}, "macro.spark_utils.spark_analyze_tables": {"unique_id": "macro.spark_utils.spark_analyze_tables", "package_name": "spark_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/spark_utils", "path": "macros/maintenance_operation.sql", "original_file_path": "macros/maintenance_operation.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "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}, "patch_path": null, "arguments": [], "created_at": 1666728757.504761, "supported_languages": null}, "macro.spark_utils.spark__concat": {"unique_id": "macro.spark_utils.spark__concat", "package_name": "spark_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/spark_utils", "path": "macros/dbt_utils/cross_db_utils/concat.sql", "original_file_path": "macros/dbt_utils/cross_db_utils/concat.sql", "name": "spark__concat", "macro_sql": "{% macro spark__concat(fields) -%}\n concat({{ fields|join(', ') }})\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.5049758, "supported_languages": null}, "macro.spark_utils.spark__type_numeric": {"unique_id": "macro.spark_utils.spark__type_numeric", "package_name": "spark_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/spark_utils", "path": "macros/dbt_utils/cross_db_utils/datatypes.sql", "original_file_path": "macros/dbt_utils/cross_db_utils/datatypes.sql", "name": "spark__type_numeric", "macro_sql": "{% macro spark__type_numeric() %}\n decimal(28, 6)\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.505126, "supported_languages": null}, "macro.spark_utils.spark__dateadd": {"unique_id": "macro.spark_utils.spark__dateadd", "package_name": "spark_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/spark_utils", "path": "macros/dbt_utils/cross_db_utils/dateadd.sql", "original_file_path": "macros/dbt_utils/cross_db_utils/dateadd.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.spark_utils.assert_not_null"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.507597, "supported_languages": null}, "macro.spark_utils.spark__datediff": {"unique_id": "macro.spark_utils.spark__datediff", "package_name": "spark_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/spark_utils", "path": "macros/dbt_utils/cross_db_utils/datediff.sql", "original_file_path": "macros/dbt_utils/cross_db_utils/datediff.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.spark_utils.assert_not_null"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.514014, "supported_languages": null}, "macro.spark_utils.spark__current_timestamp": {"unique_id": "macro.spark_utils.spark__current_timestamp", "package_name": "spark_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/spark_utils", "path": "macros/dbt_utils/cross_db_utils/current_timestamp.sql", "original_file_path": "macros/dbt_utils/cross_db_utils/current_timestamp.sql", "name": "spark__current_timestamp", "macro_sql": "{% macro spark__current_timestamp() %}\n current_timestamp()\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.5141919, "supported_languages": null}, "macro.spark_utils.spark__current_timestamp_in_utc": {"unique_id": "macro.spark_utils.spark__current_timestamp_in_utc", "package_name": "spark_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/spark_utils", "path": "macros/dbt_utils/cross_db_utils/current_timestamp.sql", "original_file_path": "macros/dbt_utils/cross_db_utils/current_timestamp.sql", "name": "spark__current_timestamp_in_utc", "macro_sql": "{% macro spark__current_timestamp_in_utc() %}\n unix_timestamp()\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.5142558, "supported_languages": null}, "macro.spark_utils.spark__split_part": {"unique_id": "macro.spark_utils.spark__split_part", "package_name": "spark_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/spark_utils", "path": "macros/dbt_utils/cross_db_utils/split_part.sql", "original_file_path": "macros/dbt_utils/cross_db_utils/split_part.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.514803, "supported_languages": null}, "macro.spark_utils.spark__get_relations_by_pattern": {"unique_id": "macro.spark_utils.spark__get_relations_by_pattern", "package_name": "spark_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/spark_utils", "path": "macros/dbt_utils/sql/get_relations_by_prefix.sql", "original_file_path": "macros/dbt_utils/sql/get_relations_by_prefix.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.5162292, "supported_languages": null}, "macro.spark_utils.spark__get_relations_by_prefix": {"unique_id": "macro.spark_utils.spark__get_relations_by_prefix", "package_name": "spark_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/spark_utils", "path": "macros/dbt_utils/sql/get_relations_by_prefix.sql", "original_file_path": "macros/dbt_utils/sql/get_relations_by_prefix.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.spark_utils.spark__get_relations_by_pattern"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.5165231, "supported_languages": null}, "macro.spark_utils.spark__get_tables_by_pattern": {"unique_id": "macro.spark_utils.spark__get_tables_by_pattern", "package_name": "spark_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/spark_utils", "path": "macros/dbt_utils/sql/get_relations_by_prefix.sql", "original_file_path": "macros/dbt_utils/sql/get_relations_by_prefix.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.spark_utils.spark__get_relations_by_pattern"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.5167701, "supported_languages": null}, "macro.spark_utils.spark__get_tables_by_prefix": {"unique_id": "macro.spark_utils.spark__get_tables_by_prefix", "package_name": "spark_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/spark_utils", "path": "macros/dbt_utils/sql/get_relations_by_prefix.sql", "original_file_path": "macros/dbt_utils/sql/get_relations_by_prefix.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.spark_utils.spark__get_relations_by_prefix"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.5170088, "supported_languages": null}, "macro.spark_utils.assert_not_null": {"unique_id": "macro.spark_utils.assert_not_null", "package_name": "spark_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/spark_utils", "path": "macros/etc/assert_not_null.sql", "original_file_path": "macros/etc/assert_not_null.sql", "name": "assert_not_null", "macro_sql": "{% macro assert_not_null(function, arg) -%}\n {{ return(adapter.dispatch('assert_not_null', 'spark_utils')(function, arg)) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.spark_utils.default__assert_not_null"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.517343, "supported_languages": null}, "macro.spark_utils.default__assert_not_null": {"unique_id": "macro.spark_utils.default__assert_not_null", "package_name": "spark_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/spark_utils", "path": "macros/etc/assert_not_null.sql", "original_file_path": "macros/etc/assert_not_null.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.5175161, "supported_languages": null}, "macro.spark_utils.spark__convert_timezone": {"unique_id": "macro.spark_utils.spark__convert_timezone", "package_name": "spark_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/spark_utils", "path": "macros/snowplow/convert_timezone.sql", "original_file_path": "macros/snowplow/convert_timezone.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.517747, "supported_languages": null}, "macro.fivetran_utils.enabled_vars": {"unique_id": "macro.fivetran_utils.enabled_vars", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/enabled_vars.sql", "original_file_path": "macros/enabled_vars.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.5181382, "supported_languages": null}, "macro.fivetran_utils.percentile": {"unique_id": "macro.fivetran_utils.percentile", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/percentile.sql", "original_file_path": "macros/percentile.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.fivetran_utils.bigquery__percentile"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.519, "supported_languages": null}, "macro.fivetran_utils.default__percentile": {"unique_id": "macro.fivetran_utils.default__percentile", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/percentile.sql", "original_file_path": "macros/percentile.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.519145, "supported_languages": null}, "macro.fivetran_utils.redshift__percentile": {"unique_id": "macro.fivetran_utils.redshift__percentile", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/percentile.sql", "original_file_path": "macros/percentile.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.519289, "supported_languages": null}, "macro.fivetran_utils.bigquery__percentile": {"unique_id": "macro.fivetran_utils.bigquery__percentile", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/percentile.sql", "original_file_path": "macros/percentile.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.5194292, "supported_languages": null}, "macro.fivetran_utils.postgres__percentile": {"unique_id": "macro.fivetran_utils.postgres__percentile", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/percentile.sql", "original_file_path": "macros/percentile.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.519556, "supported_languages": null}, "macro.fivetran_utils.spark__percentile": {"unique_id": "macro.fivetran_utils.spark__percentile", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/percentile.sql", "original_file_path": "macros/percentile.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.5197, "supported_languages": null}, "macro.fivetran_utils.pivot_json_extract": {"unique_id": "macro.fivetran_utils.pivot_json_extract", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/pivot_json_extract.sql", "original_file_path": "macros/pivot_json_extract.sql", "name": "pivot_json_extract", "macro_sql": "{% macro pivot_json_extract(string, list_of_properties) %}\n\n{%- for property in list_of_properties -%}\n\nreplace( {{ fivetran_utils.json_extract(string, property) }}, '\"', '') as {{ property | replace(' ', '_') | lower }}\n\n{%- if not loop.last -%},{%- endif %}\n{% endfor -%}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.fivetran_utils.json_extract"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.520121, "supported_languages": null}, "macro.fivetran_utils.persist_pass_through_columns": {"unique_id": "macro.fivetran_utils.persist_pass_through_columns", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/persist_pass_through_columns.sql", "original_file_path": "macros/persist_pass_through_columns.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.520803, "supported_languages": null}, "macro.fivetran_utils.json_parse": {"unique_id": "macro.fivetran_utils.json_parse", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/json_parse.sql", "original_file_path": "macros/json_parse.sql", "name": "json_parse", "macro_sql": "{% macro json_parse(string, string_path) -%}\n\n{{ adapter.dispatch('json_parse', 'fivetran_utils') (string, string_path) }}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.fivetran_utils.bigquery__json_parse"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.521798, "supported_languages": null}, "macro.fivetran_utils.default__json_parse": {"unique_id": "macro.fivetran_utils.default__json_parse", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/json_parse.sql", "original_file_path": "macros/json_parse.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.522018, "supported_languages": null}, "macro.fivetran_utils.redshift__json_parse": {"unique_id": "macro.fivetran_utils.redshift__json_parse", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/json_parse.sql", "original_file_path": "macros/json_parse.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.522231, "supported_languages": null}, "macro.fivetran_utils.bigquery__json_parse": {"unique_id": "macro.fivetran_utils.bigquery__json_parse", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/json_parse.sql", "original_file_path": "macros/json_parse.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.52244, "supported_languages": null}, "macro.fivetran_utils.postgres__json_parse": {"unique_id": "macro.fivetran_utils.postgres__json_parse", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/json_parse.sql", "original_file_path": "macros/json_parse.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.52265, "supported_languages": null}, "macro.fivetran_utils.snowflake__json_parse": {"unique_id": "macro.fivetran_utils.snowflake__json_parse", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/json_parse.sql", "original_file_path": "macros/json_parse.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.522882, "supported_languages": null}, "macro.fivetran_utils.spark__json_parse": {"unique_id": "macro.fivetran_utils.spark__json_parse", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/json_parse.sql", "original_file_path": "macros/json_parse.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.523108, "supported_languages": null}, "macro.fivetran_utils.max_bool": {"unique_id": "macro.fivetran_utils.max_bool", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/max_bool.sql", "original_file_path": "macros/max_bool.sql", "name": "max_bool", "macro_sql": "{% macro max_bool(boolean_field) -%}\n\n{{ adapter.dispatch('max_bool', 'fivetran_utils') (boolean_field) }}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.fivetran_utils.bigquery__max_bool"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.523445, "supported_languages": null}, "macro.fivetran_utils.default__max_bool": {"unique_id": "macro.fivetran_utils.default__max_bool", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/max_bool.sql", "original_file_path": "macros/max_bool.sql", "name": "default__max_bool", "macro_sql": "{% macro default__max_bool(boolean_field) %}\n\n bool_or( {{ boolean_field }} )\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.523533, "supported_languages": null}, "macro.fivetran_utils.snowflake__max_bool": {"unique_id": "macro.fivetran_utils.snowflake__max_bool", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/max_bool.sql", "original_file_path": "macros/max_bool.sql", "name": "snowflake__max_bool", "macro_sql": "{% macro snowflake__max_bool(boolean_field) %}\n\n max( {{ boolean_field }} )\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.5236192, "supported_languages": null}, "macro.fivetran_utils.bigquery__max_bool": {"unique_id": "macro.fivetran_utils.bigquery__max_bool", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/max_bool.sql", "original_file_path": "macros/max_bool.sql", "name": "bigquery__max_bool", "macro_sql": "{% macro bigquery__max_bool(boolean_field) %}\n\n max( {{ boolean_field }} )\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.523703, "supported_languages": null}, "macro.fivetran_utils.calculated_fields": {"unique_id": "macro.fivetran_utils.calculated_fields", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/calculated_fields.sql", "original_file_path": "macros/calculated_fields.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.5240781, "supported_languages": null}, "macro.fivetran_utils.seed_data_helper": {"unique_id": "macro.fivetran_utils.seed_data_helper", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/seed_data_helper.sql", "original_file_path": "macros/seed_data_helper.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.524637, "supported_languages": null}, "macro.fivetran_utils.fill_pass_through_columns": {"unique_id": "macro.fivetran_utils.fill_pass_through_columns", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/fill_pass_through_columns.sql", "original_file_path": "macros/fill_pass_through_columns.sql", "name": "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.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 {% endfor %}\n{% endif %}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.525221, "supported_languages": null}, "macro.fivetran_utils.string_agg": {"unique_id": "macro.fivetran_utils.string_agg", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/string_agg.sql", "original_file_path": "macros/string_agg.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.fivetran_utils.default__string_agg"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.5256891, "supported_languages": null}, "macro.fivetran_utils.default__string_agg": {"unique_id": "macro.fivetran_utils.default__string_agg", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/string_agg.sql", "original_file_path": "macros/string_agg.sql", "name": "default__string_agg", "macro_sql": "{% macro default__string_agg(field_to_agg, delimiter) %}\n string_agg({{ field_to_agg }}, {{ delimiter }})\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.525808, "supported_languages": null}, "macro.fivetran_utils.snowflake__string_agg": {"unique_id": "macro.fivetran_utils.snowflake__string_agg", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/string_agg.sql", "original_file_path": "macros/string_agg.sql", "name": "snowflake__string_agg", "macro_sql": "{% macro snowflake__string_agg(field_to_agg, delimiter) %}\n listagg({{ field_to_agg }}, {{ delimiter }})\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.525919, "supported_languages": null}, "macro.fivetran_utils.redshift__string_agg": {"unique_id": "macro.fivetran_utils.redshift__string_agg", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/string_agg.sql", "original_file_path": "macros/string_agg.sql", "name": "redshift__string_agg", "macro_sql": "{% macro redshift__string_agg(field_to_agg, delimiter) %}\n listagg({{ field_to_agg }}, {{ delimiter }})\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.526028, "supported_languages": null}, "macro.fivetran_utils.spark__string_agg": {"unique_id": "macro.fivetran_utils.spark__string_agg", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/string_agg.sql", "original_file_path": "macros/string_agg.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.526203, "supported_languages": null}, "macro.fivetran_utils.timestamp_diff": {"unique_id": "macro.fivetran_utils.timestamp_diff", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/timestamp_diff.sql", "original_file_path": "macros/timestamp_diff.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.fivetran_utils.bigquery__timestamp_diff"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.528755, "supported_languages": null}, "macro.fivetran_utils.default__timestamp_diff": {"unique_id": "macro.fivetran_utils.default__timestamp_diff", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/timestamp_diff.sql", "original_file_path": "macros/timestamp_diff.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.5289001, "supported_languages": null}, "macro.fivetran_utils.redshift__timestamp_diff": {"unique_id": "macro.fivetran_utils.redshift__timestamp_diff", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/timestamp_diff.sql", "original_file_path": "macros/timestamp_diff.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.5290391, "supported_languages": null}, "macro.fivetran_utils.bigquery__timestamp_diff": {"unique_id": "macro.fivetran_utils.bigquery__timestamp_diff", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/timestamp_diff.sql", "original_file_path": "macros/timestamp_diff.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.529173, "supported_languages": null}, "macro.fivetran_utils.postgres__timestamp_diff": {"unique_id": "macro.fivetran_utils.postgres__timestamp_diff", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/timestamp_diff.sql", "original_file_path": "macros/timestamp_diff.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.datediff"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.530668, "supported_languages": null}, "macro.fivetran_utils.try_cast": {"unique_id": "macro.fivetran_utils.try_cast", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/try_cast.sql", "original_file_path": "macros/try_cast.sql", "name": "try_cast", "macro_sql": "{% macro try_cast(field, type) %}\n {{ adapter.dispatch('try_cast', 'fivetran_utils') (field, type) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.fivetran_utils.bigquery__try_cast"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.53146, "supported_languages": null}, "macro.fivetran_utils.default__safe_cast": {"unique_id": "macro.fivetran_utils.default__safe_cast", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/try_cast.sql", "original_file_path": "macros/try_cast.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.5315819, "supported_languages": null}, "macro.fivetran_utils.redshift__try_cast": {"unique_id": "macro.fivetran_utils.redshift__try_cast", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/try_cast.sql", "original_file_path": "macros/try_cast.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.531821, "supported_languages": null}, "macro.fivetran_utils.postgres__try_cast": {"unique_id": "macro.fivetran_utils.postgres__try_cast", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/try_cast.sql", "original_file_path": "macros/try_cast.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.5320718, "supported_languages": null}, "macro.fivetran_utils.snowflake__try_cast": {"unique_id": "macro.fivetran_utils.snowflake__try_cast", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/try_cast.sql", "original_file_path": "macros/try_cast.sql", "name": "snowflake__try_cast", "macro_sql": "{% macro snowflake__try_cast(field, type) %}\n try_cast(cast({{field}} as varchar) as {{type}})\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.532186, "supported_languages": null}, "macro.fivetran_utils.bigquery__try_cast": {"unique_id": "macro.fivetran_utils.bigquery__try_cast", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/try_cast.sql", "original_file_path": "macros/try_cast.sql", "name": "bigquery__try_cast", "macro_sql": "{% macro bigquery__try_cast(field, type) %}\n safe_cast({{field}} as {{type}})\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.5322938, "supported_languages": null}, "macro.fivetran_utils.spark__try_cast": {"unique_id": "macro.fivetran_utils.spark__try_cast", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/try_cast.sql", "original_file_path": "macros/try_cast.sql", "name": "spark__try_cast", "macro_sql": "{% macro spark__try_cast(field, type) %}\n try_cast({{field}} as {{type}})\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.5323992, "supported_languages": null}, "macro.fivetran_utils.source_relation": {"unique_id": "macro.fivetran_utils.source_relation", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/source_relation.sql", "original_file_path": "macros/source_relation.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.fivetran_utils.default__source_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.532898, "supported_languages": null}, "macro.fivetran_utils.default__source_relation": {"unique_id": "macro.fivetran_utils.default__source_relation", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/source_relation.sql", "original_file_path": "macros/source_relation.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.533398, "supported_languages": null}, "macro.fivetran_utils.first_value": {"unique_id": "macro.fivetran_utils.first_value", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/first_value.sql", "original_file_path": "macros/first_value.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.fivetran_utils.default__first_value"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.533889, "supported_languages": null}, "macro.fivetran_utils.default__first_value": {"unique_id": "macro.fivetran_utils.default__first_value", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/first_value.sql", "original_file_path": "macros/first_value.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.5340679, "supported_languages": null}, "macro.fivetran_utils.redshift__first_value": {"unique_id": "macro.fivetran_utils.redshift__first_value", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/first_value.sql", "original_file_path": "macros/first_value.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.53426, "supported_languages": null}, "macro.fivetran_utils.add_dbt_source_relation": {"unique_id": "macro.fivetran_utils.add_dbt_source_relation", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/add_dbt_source_relation.sql", "original_file_path": "macros/add_dbt_source_relation.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.53454, "supported_languages": null}, "macro.fivetran_utils.add_pass_through_columns": {"unique_id": "macro.fivetran_utils.add_pass_through_columns", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/add_pass_through_columns.sql", "original_file_path": "macros/add_pass_through_columns.sql", "name": "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.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 {% endfor %}\n\n {% endif %}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.535368, "supported_languages": null}, "macro.fivetran_utils.union_relations": {"unique_id": "macro.fivetran_utils.union_relations", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/union_relations.sql", "original_file_path": "macros/union_relations.sql", "name": "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_utils.string_literal(relation) }} as {{ dbt_utils.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", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils._is_relation", "macro.dbt.string_literal", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.538862, "supported_languages": null}, "macro.fivetran_utils.union_tables": {"unique_id": "macro.fivetran_utils.union_tables", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/union_relations.sql", "original_file_path": "macros/union_relations.sql", "name": "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 -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.union_relations"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.5391822, "supported_languages": null}, "macro.fivetran_utils.snowflake_seed_data": {"unique_id": "macro.fivetran_utils.snowflake_seed_data", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/snowflake_seed_data.sql", "original_file_path": "macros/snowflake_seed_data.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.539562, "supported_languages": null}, "macro.fivetran_utils.fill_staging_columns": {"unique_id": "macro.fivetran_utils.fill_staging_columns", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/fill_staging_columns.sql", "original_file_path": "macros/fill_staging_columns.sql", "name": "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\n{%- for column in staging_columns %}\n {% if column.name|lower in source_column_names -%}\n {{ fivetran_utils.quote_column(column) }} as \n {%- if 'alias' in column %} {{ column.alias }} {% else %} {{ fivetran_utils.quote_column(column) }} {%- endif -%}\n {%- else -%}\n cast(null as {{ column.datatype }})\n {%- if 'alias' in column %} as {{ column.alias }} {% else %} as {{ fivetran_utils.quote_column(column) }} {% endif -%}\n {%- endif -%}\n {%- if not loop.last -%} , {% endif -%}\n{% endfor %}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.fivetran_utils.quote_column"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.54094, "supported_languages": null}, "macro.fivetran_utils.quote_column": {"unique_id": "macro.fivetran_utils.quote_column", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/fill_staging_columns.sql", "original_file_path": "macros/fill_staging_columns.sql", "name": "quote_column", "macro_sql": "{% macro quote_column(column) %}\n {% if 'quote' in column %}\n {% if column.quote %}\n {% if target.type in ('bigquery', 'spark') %}\n `{{ column.name }}`\n {% elif target.type == 'snowflake' %}\n \"{{ column.name | upper }}\"\n {% else %}\n \"{{ column.name }}\"\n {% endif %}\n {% else %}\n {{ column.name }}\n {% endif %}\n {% else %}\n {{ column.name }}\n {% endif %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.5414348, "supported_languages": null}, "macro.fivetran_utils.json_extract": {"unique_id": "macro.fivetran_utils.json_extract", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/json_extract.sql", "original_file_path": "macros/json_extract.sql", "name": "json_extract", "macro_sql": "{% macro json_extract(string, string_path) -%}\n\n{{ adapter.dispatch('json_extract', 'fivetran_utils') (string, string_path) }}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.fivetran_utils.bigquery__json_extract"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.541995, "supported_languages": null}, "macro.fivetran_utils.default__json_extract": {"unique_id": "macro.fivetran_utils.default__json_extract", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/json_extract.sql", "original_file_path": "macros/json_extract.sql", "name": "default__json_extract", "macro_sql": "{% macro default__json_extract(string, string_path) %}\n\n json_extract_path_text({{string}}, {{ \"'\" ~ string_path ~ \"'\" }} )\n \n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.542131, "supported_languages": null}, "macro.fivetran_utils.snowflake__json_extract": {"unique_id": "macro.fivetran_utils.snowflake__json_extract", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/json_extract.sql", "original_file_path": "macros/json_extract.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.54227, "supported_languages": null}, "macro.fivetran_utils.redshift__json_extract": {"unique_id": "macro.fivetran_utils.redshift__json_extract", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/json_extract.sql", "original_file_path": "macros/json_extract.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.542426, "supported_languages": null}, "macro.fivetran_utils.bigquery__json_extract": {"unique_id": "macro.fivetran_utils.bigquery__json_extract", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/json_extract.sql", "original_file_path": "macros/json_extract.sql", "name": "bigquery__json_extract", "macro_sql": "{% macro bigquery__json_extract(string, string_path) %}\n\n json_extract_scalar({{string}}, {{ \"'$.\" ~ string_path ~ \"'\" }} )\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.5425558, "supported_languages": null}, "macro.fivetran_utils.postgres__json_extract": {"unique_id": "macro.fivetran_utils.postgres__json_extract", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/json_extract.sql", "original_file_path": "macros/json_extract.sql", "name": "postgres__json_extract", "macro_sql": "{% macro postgres__json_extract(string, string_path) %}\n\n {{string}}::json->>{{\"'\" ~ string_path ~ \"'\" }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.542687, "supported_languages": null}, "macro.fivetran_utils.collect_freshness": {"unique_id": "macro.fivetran_utils.collect_freshness", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/collect_freshness.sql", "original_file_path": "macros/collect_freshness.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.fivetran_utils.default__collect_freshness"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.54336, "supported_languages": null}, "macro.fivetran_utils.default__collect_freshness": {"unique_id": "macro.fivetran_utils.default__collect_freshness", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/collect_freshness.sql", "original_file_path": "macros/collect_freshness.sql", "name": "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 {{ return(load_result('collect_freshness').table) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement", "macro.dbt.current_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.544235, "supported_languages": null}, "macro.fivetran_utils.timestamp_add": {"unique_id": "macro.fivetran_utils.timestamp_add", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/timestamp_add.sql", "original_file_path": "macros/timestamp_add.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.fivetran_utils.bigquery__timestamp_add"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.544905, "supported_languages": null}, "macro.fivetran_utils.default__timestamp_add": {"unique_id": "macro.fivetran_utils.default__timestamp_add", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/timestamp_add.sql", "original_file_path": "macros/timestamp_add.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.5450509, "supported_languages": null}, "macro.fivetran_utils.bigquery__timestamp_add": {"unique_id": "macro.fivetran_utils.bigquery__timestamp_add", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/timestamp_add.sql", "original_file_path": "macros/timestamp_add.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.5451891, "supported_languages": null}, "macro.fivetran_utils.redshift__timestamp_add": {"unique_id": "macro.fivetran_utils.redshift__timestamp_add", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/timestamp_add.sql", "original_file_path": "macros/timestamp_add.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.545326, "supported_languages": null}, "macro.fivetran_utils.postgres__timestamp_add": {"unique_id": "macro.fivetran_utils.postgres__timestamp_add", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/timestamp_add.sql", "original_file_path": "macros/timestamp_add.sql", "name": "postgres__timestamp_add", "macro_sql": "{% macro postgres__timestamp_add(datepart, interval, from_timestamp) %}\n\n {{ from_timestamp }} + ((interval '1 {{ datepart }}') * ({{ interval }}))\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.54546, "supported_languages": null}, "macro.fivetran_utils.spark__timestamp_add": {"unique_id": "macro.fivetran_utils.spark__timestamp_add", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/timestamp_add.sql", "original_file_path": "macros/timestamp_add.sql", "name": "spark__timestamp_add", "macro_sql": "{% macro spark__timestamp_add(datepart, interval, from_timestamp) %}\n\n {{ dbt.dateadd(datepart, interval, from_timestamp) }}\n \n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.dateadd"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.545673, "supported_languages": null}, "macro.fivetran_utils.ceiling": {"unique_id": "macro.fivetran_utils.ceiling", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/ceiling.sql", "original_file_path": "macros/ceiling.sql", "name": "ceiling", "macro_sql": "{% macro ceiling(num) -%}\n\n{{ adapter.dispatch('ceiling', 'fivetran_utils') (num) }}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.fivetran_utils.default__ceiling"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.545951, "supported_languages": null}, "macro.fivetran_utils.default__ceiling": {"unique_id": "macro.fivetran_utils.default__ceiling", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/ceiling.sql", "original_file_path": "macros/ceiling.sql", "name": "default__ceiling", "macro_sql": "{% macro default__ceiling(num) %}\n ceiling({{ num }})\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.54604, "supported_languages": null}, "macro.fivetran_utils.snowflake__ceiling": {"unique_id": "macro.fivetran_utils.snowflake__ceiling", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/ceiling.sql", "original_file_path": "macros/ceiling.sql", "name": "snowflake__ceiling", "macro_sql": "{% macro snowflake__ceiling(num) %}\n ceil({{ num }})\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.5461261, "supported_languages": null}, "macro.fivetran_utils.remove_prefix_from_columns": {"unique_id": "macro.fivetran_utils.remove_prefix_from_columns", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/remove_prefix_from_columns.sql", "original_file_path": "macros/remove_prefix_from_columns.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.5467331, "supported_languages": null}, "macro.fivetran_utils.union_data": {"unique_id": "macro.fivetran_utils.union_data", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/union_data.sql", "original_file_path": "macros/union_data.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.fivetran_utils.default__union_data"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.548, "supported_languages": null}, "macro.fivetran_utils.default__union_data": {"unique_id": "macro.fivetran_utils.default__union_data", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/union_data.sql", "original_file_path": "macros/union_data.sql", "name": "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\n {% do relations.append(relation) %}\n \n {% endif %}\n\n {% endfor %}\n\n {{ dbt_utils.union_relations(relations) }}\n\n{% elif var(union_database_variable, none) %}\n\n {% set relations = [] %}\n\n {% for database in var(union_database_variable) %}\n\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\n {% do relations.append(relation) %}\n \n {% endif %}\n\n {% endfor %}\n\n {{ dbt_utils.union_relations(relations) }}\n\n{% else %}\n\n select * \n from {{ var(default_variable) }}\n\n{% endif %}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.union_relations"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.550118, "supported_languages": null}, "macro.fivetran_utils.dummy_coalesce_value": {"unique_id": "macro.fivetran_utils.dummy_coalesce_value", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/dummy_coalesce_value.sql", "original_file_path": "macros/dummy_coalesce_value.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.55141, "supported_languages": null}, "macro.fivetran_utils.array_agg": {"unique_id": "macro.fivetran_utils.array_agg", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/array_agg.sql", "original_file_path": "macros/array_agg.sql", "name": "array_agg", "macro_sql": "{% macro array_agg(field_to_agg) -%}\n\n{{ adapter.dispatch('array_agg', 'fivetran_utils') (field_to_agg) }}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.fivetran_utils.default__array_agg"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.551702, "supported_languages": null}, "macro.fivetran_utils.default__array_agg": {"unique_id": "macro.fivetran_utils.default__array_agg", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/array_agg.sql", "original_file_path": "macros/array_agg.sql", "name": "default__array_agg", "macro_sql": "{% macro default__array_agg(field_to_agg) %}\n array_agg({{ field_to_agg }})\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.5517921, "supported_languages": null}, "macro.fivetran_utils.redshift__array_agg": {"unique_id": "macro.fivetran_utils.redshift__array_agg", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/array_agg.sql", "original_file_path": "macros/array_agg.sql", "name": "redshift__array_agg", "macro_sql": "{% macro redshift__array_agg(field_to_agg) %}\n listagg({{ field_to_agg }}, ',')\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.551879, "supported_languages": null}, "macro.fivetran_utils.empty_variable_warning": {"unique_id": "macro.fivetran_utils.empty_variable_warning", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/empty_variable_warning.sql", "original_file_path": "macros/empty_variable_warning.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.552282, "supported_languages": null}, "macro.fivetran_utils.enabled_vars_one_true": {"unique_id": "macro.fivetran_utils.enabled_vars_one_true", "package_name": "fivetran_utils", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/enabled_vars_one_true.sql", "original_file_path": "macros/enabled_vars_one_true.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.5526779, "supported_languages": null}, "macro.apple_search_ads_source.get_ad_group_history_columns": {"unique_id": "macro.apple_search_ads_source.get_ad_group_history_columns", "package_name": "apple_search_ads_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "macros/get_ad_group_history_columns.sql", "original_file_path": "macros/get_ad_group_history_columns.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.type_int", "macro.dbt.type_timestamp", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.553596, "supported_languages": null}, "macro.apple_search_ads_source.get_ad_level_report_columns": {"unique_id": "macro.apple_search_ads_source.get_ad_level_report_columns", "package_name": "apple_search_ads_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "macros/get_ad_level_report_columns.sql", "original_file_path": "macros/get_ad_level_report_columns.sql", "name": "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\": \"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] %}\n\n{{ fivetran_utils.add_pass_through_columns(columns, var('apple_search_ads__ad_passthrough_metrics')) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.type_int", "macro.dbt.type_numeric", "macro.dbt.type_string", "macro.fivetran_utils.add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.5547671, "supported_languages": null}, "macro.apple_search_ads_source.get_search_term_report_columns": {"unique_id": "macro.apple_search_ads_source.get_search_term_report_columns", "package_name": "apple_search_ads_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "macros/get_search_term_report_columns.sql", "original_file_path": "macros/get_search_term_report_columns.sql", "name": "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\": \"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] %}\n\n{{ return(columns) }}\n\n{{ fivetran_utils.add_pass_through_columns(columns, var('apple_search_ads__search_term_passthrough_metrics')) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.type_string", "macro.dbt.type_int", "macro.dbt.type_numeric", "macro.fivetran_utils.add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.557017, "supported_languages": null}, "macro.apple_search_ads_source.get_keyword_report_columns": {"unique_id": "macro.apple_search_ads_source.get_keyword_report_columns", "package_name": "apple_search_ads_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "macros/get_keyword_report_columns.sql", "original_file_path": "macros/get_keyword_report_columns.sql", "name": "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\": \"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] %}\n\n{{ fivetran_utils.add_pass_through_columns(columns, var('apple_search_ads__keyword_passthrough_metrics')) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.type_int", "macro.dbt.type_numeric", "macro.dbt.type_string", "macro.fivetran_utils.add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.558004, "supported_languages": null}, "macro.apple_search_ads_source.get_campaign_report_columns": {"unique_id": "macro.apple_search_ads_source.get_campaign_report_columns", "package_name": "apple_search_ads_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "macros/get_campaign_report_columns.sql", "original_file_path": "macros/get_campaign_report_columns.sql", "name": "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\": \"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] %}\n\n{{ fivetran_utils.add_pass_through_columns(columns, var('apple_search_ads__campaign_passthrough_metrics')) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.type_int", "macro.dbt.type_numeric", "macro.dbt.type_string", "macro.fivetran_utils.add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.5589929, "supported_languages": null}, "macro.apple_search_ads_source.get_campaign_history_columns": {"unique_id": "macro.apple_search_ads_source.get_campaign_history_columns", "package_name": "apple_search_ads_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "macros/get_campaign_history_columns.sql", "original_file_path": "macros/get_campaign_history_columns.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_int", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.5598102, "supported_languages": null}, "macro.apple_search_ads_source.get_ad_history_columns": {"unique_id": "macro.apple_search_ads_source.get_ad_history_columns", "package_name": "apple_search_ads_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "macros/get_ad_history_columns.sql", "original_file_path": "macros/get_ad_history_columns.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.type_int", "macro.dbt.type_timestamp", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.560717, "supported_languages": null}, "macro.apple_search_ads_source.get_ad_group_report_columns": {"unique_id": "macro.apple_search_ads_source.get_ad_group_report_columns", "package_name": "apple_search_ads_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "macros/get_ad_group_report_columns.sql", "original_file_path": "macros/get_ad_group_report_columns.sql", "name": "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\": \"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] %}\n\n{{ fivetran_utils.add_pass_through_columns(columns, var('apple_search_ads__ad_group_passthrough_metrics')) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.type_int", "macro.dbt.type_numeric", "macro.dbt.type_string", "macro.fivetran_utils.add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.561697, "supported_languages": null}, "macro.apple_search_ads_source.get_organization_columns": {"unique_id": "macro.apple_search_ads_source.get_organization_columns", "package_name": "apple_search_ads_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "macros/get_organization_columns.sql", "original_file_path": "macros/get_organization_columns.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.type_string", "macro.dbt.type_int"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1666728757.562343, "supported_languages": null}, "macro.apple_search_ads_source.get_keyword_history_columns": {"unique_id": "macro.apple_search_ads_source.get_keyword_history_columns", "package_name": "apple_search_ads_source", "root_path": "/Users/jamie.rodriguez/Desktop/dbt_repos/Apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "macros/get_keyword_history_columns.sql", "original_file_path": "macros/get_keyword_history_columns.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "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}, "patch_path": null, "arguments": [], "created_at": 1666728757.563339, "supported_languages": null}}, "docs": {"dbt.__overview__": {"unique_id": "dbt.__overview__", "package_name": "dbt", "root_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dbt/include/global_project", "path": "overview.md", "original_file_path": "docs/overview.md", "name": "__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"}}, "exposures": {}, "metrics": {}, "selectors": {}, "disabled": {}, "parent_map": {"seed.apple_search_ads_integration_tests.ad_group_report_data": [], "seed.apple_search_ads_integration_tests.ad_report_data": [], "seed.apple_search_ads_integration_tests.keyword_report_data": [], "seed.apple_search_ads_integration_tests.ad_history_data": [], "seed.apple_search_ads_integration_tests.ad_group_history_data": [], "seed.apple_search_ads_integration_tests.campaign_history_data": [], "seed.apple_search_ads_integration_tests.campaign_report_data": [], "seed.apple_search_ads_integration_tests.keyword_history_data": [], "seed.apple_search_ads_integration_tests.search_term_report_data": [], "seed.apple_search_ads_integration_tests.organization_data": [], "model.apple_search_ads.apple_search_ads__ad_report": ["model.apple_search_ads_source.stg_apple_search_ads__ad_group_history", "model.apple_search_ads_source.stg_apple_search_ads__ad_history", "model.apple_search_ads_source.stg_apple_search_ads__ad_report", "model.apple_search_ads_source.stg_apple_search_ads__campaign_history", "model.apple_search_ads_source.stg_apple_search_ads__organization"], "model.apple_search_ads.apple_search_ads__ad_group_report": ["model.apple_search_ads_source.stg_apple_search_ads__ad_group_history", "model.apple_search_ads_source.stg_apple_search_ads__ad_group_report", "model.apple_search_ads_source.stg_apple_search_ads__campaign_history", "model.apple_search_ads_source.stg_apple_search_ads__organization"], "model.apple_search_ads.apple_search_ads__keyword_report": ["model.apple_search_ads_source.stg_apple_search_ads__ad_group_history", "model.apple_search_ads_source.stg_apple_search_ads__campaign_history", "model.apple_search_ads_source.stg_apple_search_ads__keyword_history", "model.apple_search_ads_source.stg_apple_search_ads__keyword_report", "model.apple_search_ads_source.stg_apple_search_ads__organization"], "model.apple_search_ads.apple_search_ads__search_term_report": ["model.apple_search_ads_source.stg_apple_search_ads__campaign_history", "model.apple_search_ads_source.stg_apple_search_ads__organization", "model.apple_search_ads_source.stg_apple_search_ads__search_term_report"], "model.apple_search_ads.apple_search_ads__campaign_report": ["model.apple_search_ads_source.stg_apple_search_ads__campaign_history", "model.apple_search_ads_source.stg_apple_search_ads__campaign_report", "model.apple_search_ads_source.stg_apple_search_ads__organization"], "model.apple_search_ads.apple_search_ads__organization_report": ["model.apple_search_ads_source.stg_apple_search_ads__campaign_history", "model.apple_search_ads_source.stg_apple_search_ads__campaign_report", "model.apple_search_ads_source.stg_apple_search_ads__organization"], "model.apple_search_ads_source.stg_apple_search_ads__campaign_history": ["model.apple_search_ads_source.stg_apple_search_ads__campaign_history_tmp", "model.apple_search_ads_source.stg_apple_search_ads__campaign_history_tmp"], "model.apple_search_ads_source.stg_apple_search_ads__ad_report": ["model.apple_search_ads_source.stg_apple_search_ads__ad_report_tmp", "model.apple_search_ads_source.stg_apple_search_ads__ad_report_tmp"], "model.apple_search_ads_source.stg_apple_search_ads__campaign_report": ["model.apple_search_ads_source.stg_apple_search_ads__campaign_report_tmp", "model.apple_search_ads_source.stg_apple_search_ads__campaign_report_tmp"], "model.apple_search_ads_source.stg_apple_search_ads__organization": ["model.apple_search_ads_source.stg_apple_search_ads__organization_tmp", "model.apple_search_ads_source.stg_apple_search_ads__organization_tmp"], "model.apple_search_ads_source.stg_apple_search_ads__keyword_report": ["model.apple_search_ads_source.stg_apple_search_ads__keyword_report_tmp", "model.apple_search_ads_source.stg_apple_search_ads__keyword_report_tmp"], "model.apple_search_ads_source.stg_apple_search_ads__keyword_history": ["model.apple_search_ads_source.stg_apple_search_ads__keyword_history_tmp", "model.apple_search_ads_source.stg_apple_search_ads__keyword_history_tmp"], "model.apple_search_ads_source.stg_apple_search_ads__search_term_report": ["model.apple_search_ads_source.stg_apple_search_ads__search_term_report_tmp", "model.apple_search_ads_source.stg_apple_search_ads__search_term_report_tmp"], "model.apple_search_ads_source.stg_apple_search_ads__ad_group_history": ["model.apple_search_ads_source.stg_apple_search_ads__ad_group_history_tmp", "model.apple_search_ads_source.stg_apple_search_ads__ad_group_history_tmp"], "model.apple_search_ads_source.stg_apple_search_ads__ad_history": ["model.apple_search_ads_source.stg_apple_search_ads__ad_history_tmp", "model.apple_search_ads_source.stg_apple_search_ads__ad_history_tmp"], "model.apple_search_ads_source.stg_apple_search_ads__ad_group_report": ["model.apple_search_ads_source.stg_apple_search_ads__ad_group_report_tmp", "model.apple_search_ads_source.stg_apple_search_ads__ad_group_report_tmp"], "model.apple_search_ads_source.stg_apple_search_ads__search_term_report_tmp": ["source.apple_search_ads_source.apple_search_ads.search_term_report"], "model.apple_search_ads_source.stg_apple_search_ads__campaign_history_tmp": ["source.apple_search_ads_source.apple_search_ads.campaign_history"], "model.apple_search_ads_source.stg_apple_search_ads__keyword_history_tmp": ["source.apple_search_ads_source.apple_search_ads.keyword_history"], "model.apple_search_ads_source.stg_apple_search_ads__ad_group_history_tmp": ["source.apple_search_ads_source.apple_search_ads.ad_group_history"], "model.apple_search_ads_source.stg_apple_search_ads__ad_group_report_tmp": ["source.apple_search_ads_source.apple_search_ads.ad_group_report"], "model.apple_search_ads_source.stg_apple_search_ads__ad_history_tmp": ["source.apple_search_ads_source.apple_search_ads.ad_history"], "model.apple_search_ads_source.stg_apple_search_ads__campaign_report_tmp": ["source.apple_search_ads_source.apple_search_ads.campaign_report"], "model.apple_search_ads_source.stg_apple_search_ads__organization_tmp": ["source.apple_search_ads_source.apple_search_ads.organization"], "model.apple_search_ads_source.stg_apple_search_ads__keyword_report_tmp": ["source.apple_search_ads_source.apple_search_ads.keyword_report"], "model.apple_search_ads_source.stg_apple_search_ads__ad_report_tmp": ["source.apple_search_ads_source.apple_search_ads.ad_level_report"], "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.dbt_utils_unique_combination_of_columns_apple_search_ads__ad_group_report_organization_id__campaign_id__ad_group_id__date_day.19d180bab9": ["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.dbt_utils_unique_combination_of_columns_apple_search_ads__ad_report_organization_id__campaign_id__ad_group_id__ad_id__date_day.54e27817a1": ["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.dbt_utils_unique_combination_of_columns_apple_search_ads__campaign_report_organization_id__campaign_id__date_day.647e56213f": ["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.dbt_utils_unique_combination_of_columns_apple_search_ads__keyword_report_organization_id__campaign_id__ad_group_id__keyword_id__date_day.78fb033a13": ["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.dbt_utils_unique_combination_of_columns_apple_search_ads__organization_report_organization_id__date_day.8bc84fccc3": ["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.dbt_utils_unique_combination_of_columns_apple_search_ads__search_term_report_search_term_text__date_day.e60fe79ec4": ["model.apple_search_ads.apple_search_ads__search_term_report"], "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_group_history_modified_at.e5d65fa28f": ["model.apple_search_ads_source.stg_apple_search_ads__ad_group_history"], "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_group_history_ad_group_id.dc128eecb7": ["model.apple_search_ads_source.stg_apple_search_ads__ad_group_history"], "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__ad_group_history_ad_group_id__modified_at.84af14c83b": ["model.apple_search_ads_source.stg_apple_search_ads__ad_group_history"], "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_group_report_ad_group_id.a115f9cfc1": ["model.apple_search_ads_source.stg_apple_search_ads__ad_group_report"], "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_group_report_date_day.4dfd46a43b": ["model.apple_search_ads_source.stg_apple_search_ads__ad_group_report"], "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__ad_group_report_ad_group_id__date_day.a0fcc4e33c": ["model.apple_search_ads_source.stg_apple_search_ads__ad_group_report"], "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_history_modified_at.2eea7e006d": ["model.apple_search_ads_source.stg_apple_search_ads__ad_history"], "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_history_ad_id.4ad3bde32a": ["model.apple_search_ads_source.stg_apple_search_ads__ad_history"], "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__ad_history_ad_id__modified_at.38599b8cba": ["model.apple_search_ads_source.stg_apple_search_ads__ad_history"], "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_report_date_day.e6252346d8": ["model.apple_search_ads_source.stg_apple_search_ads__ad_report"], "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_report_ad_group_id.a397755e9f": ["model.apple_search_ads_source.stg_apple_search_ads__ad_report"], "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_report_ad_id.d08e760c58": ["model.apple_search_ads_source.stg_apple_search_ads__ad_report"], "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__ad_report_ad_id__date_day__ad_group_id.0d8d23c516": ["model.apple_search_ads_source.stg_apple_search_ads__ad_report"], "test.apple_search_ads_source.not_null_stg_apple_search_ads__campaign_history_modified_at.f34a7a97c9": ["model.apple_search_ads_source.stg_apple_search_ads__campaign_history"], "test.apple_search_ads_source.not_null_stg_apple_search_ads__campaign_history_campaign_id.3f0f7502b8": ["model.apple_search_ads_source.stg_apple_search_ads__campaign_history"], "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__campaign_history_campaign_id__modified_at.317f970af9": ["model.apple_search_ads_source.stg_apple_search_ads__campaign_history"], "test.apple_search_ads_source.not_null_stg_apple_search_ads__campaign_report_campaign_id.b83941e728": ["model.apple_search_ads_source.stg_apple_search_ads__campaign_report"], "test.apple_search_ads_source.not_null_stg_apple_search_ads__campaign_report_date_day.c8dc10a6f3": ["model.apple_search_ads_source.stg_apple_search_ads__campaign_report"], "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__campaign_report_campaign_id__date_day.bad41b0481": ["model.apple_search_ads_source.stg_apple_search_ads__campaign_report"], "test.apple_search_ads_source.not_null_stg_apple_search_ads__keyword_history_modified_at.42fde5a287": ["model.apple_search_ads_source.stg_apple_search_ads__keyword_history"], "test.apple_search_ads_source.not_null_stg_apple_search_ads__keyword_history_keyword_id.889f83cfd2": ["model.apple_search_ads_source.stg_apple_search_ads__keyword_history"], "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__keyword_history_keyword_id__modified_at.7b06162d24": ["model.apple_search_ads_source.stg_apple_search_ads__keyword_history"], "test.apple_search_ads_source.not_null_stg_apple_search_ads__keyword_report_keyword_id.501725b09e": ["model.apple_search_ads_source.stg_apple_search_ads__keyword_report"], "test.apple_search_ads_source.not_null_stg_apple_search_ads__keyword_report_date_day.16098db928": ["model.apple_search_ads_source.stg_apple_search_ads__keyword_report"], "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__keyword_report_keyword_id__date_day.9f0099cff8": ["model.apple_search_ads_source.stg_apple_search_ads__keyword_report"], "test.apple_search_ads_source.not_null_stg_apple_search_ads__organization_organization_id.b013ce33cb": ["model.apple_search_ads_source.stg_apple_search_ads__organization"], "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__organization_organization_id.8647048f7a": ["model.apple_search_ads_source.stg_apple_search_ads__organization"], "test.apple_search_ads_source.not_null_stg_apple_search_ads__search_term_report__fivetran_id.aa430d1dad": ["model.apple_search_ads_source.stg_apple_search_ads__search_term_report"], "test.apple_search_ads_source.not_null_stg_apple_search_ads__search_term_report_date_day.fd93df3302": ["model.apple_search_ads_source.stg_apple_search_ads__search_term_report"], "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__search_term_report__fivetran_id__date_day.aad2a48344": ["model.apple_search_ads_source.stg_apple_search_ads__search_term_report"], "source.apple_search_ads_source.apple_search_ads.ad_group_history": [], "source.apple_search_ads_source.apple_search_ads.ad_group_report": [], "source.apple_search_ads_source.apple_search_ads.ad_history": [], "source.apple_search_ads_source.apple_search_ads.ad_level_report": [], "source.apple_search_ads_source.apple_search_ads.campaign_history": [], "source.apple_search_ads_source.apple_search_ads.campaign_report": [], "source.apple_search_ads_source.apple_search_ads.keyword_history": [], "source.apple_search_ads_source.apple_search_ads.keyword_report": [], "source.apple_search_ads_source.apple_search_ads.organization": [], "source.apple_search_ads_source.apple_search_ads.search_term_report": []}, "child_map": {"seed.apple_search_ads_integration_tests.ad_group_report_data": [], "seed.apple_search_ads_integration_tests.ad_report_data": [], "seed.apple_search_ads_integration_tests.keyword_report_data": [], "seed.apple_search_ads_integration_tests.ad_history_data": [], "seed.apple_search_ads_integration_tests.ad_group_history_data": [], "seed.apple_search_ads_integration_tests.campaign_history_data": [], "seed.apple_search_ads_integration_tests.campaign_report_data": [], "seed.apple_search_ads_integration_tests.keyword_history_data": [], "seed.apple_search_ads_integration_tests.search_term_report_data": [], "seed.apple_search_ads_integration_tests.organization_data": [], "model.apple_search_ads.apple_search_ads__ad_report": ["test.apple_search_ads.dbt_utils_unique_combination_of_columns_apple_search_ads__ad_report_organization_id__campaign_id__ad_group_id__ad_id__date_day.54e27817a1", "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__ad_group_report": ["test.apple_search_ads.dbt_utils_unique_combination_of_columns_apple_search_ads__ad_group_report_organization_id__campaign_id__ad_group_id__date_day.19d180bab9", "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.apple_search_ads__keyword_report": ["test.apple_search_ads.dbt_utils_unique_combination_of_columns_apple_search_ads__keyword_report_organization_id__campaign_id__ad_group_id__keyword_id__date_day.78fb033a13", "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__search_term_report": ["test.apple_search_ads.dbt_utils_unique_combination_of_columns_apple_search_ads__search_term_report_search_term_text__date_day.e60fe79ec4", "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__campaign_report": ["test.apple_search_ads.dbt_utils_unique_combination_of_columns_apple_search_ads__campaign_report_organization_id__campaign_id__date_day.647e56213f", "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": ["test.apple_search_ads.dbt_utils_unique_combination_of_columns_apple_search_ads__organization_report_organization_id__date_day.8bc84fccc3", "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_source.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_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__campaign_history_campaign_id__modified_at.317f970af9", "test.apple_search_ads_source.not_null_stg_apple_search_ads__campaign_history_campaign_id.3f0f7502b8", "test.apple_search_ads_source.not_null_stg_apple_search_ads__campaign_history_modified_at.f34a7a97c9"], "model.apple_search_ads_source.stg_apple_search_ads__ad_report": ["model.apple_search_ads.apple_search_ads__ad_report", "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__ad_report_ad_id__date_day__ad_group_id.0d8d23c516", "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_report_ad_group_id.a397755e9f", "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_report_ad_id.d08e760c58", "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_report_date_day.e6252346d8"], "model.apple_search_ads_source.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_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__campaign_report_campaign_id__date_day.bad41b0481", "test.apple_search_ads_source.not_null_stg_apple_search_ads__campaign_report_campaign_id.b83941e728", "test.apple_search_ads_source.not_null_stg_apple_search_ads__campaign_report_date_day.c8dc10a6f3"], "model.apple_search_ads_source.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_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__organization_organization_id.8647048f7a", "test.apple_search_ads_source.not_null_stg_apple_search_ads__organization_organization_id.b013ce33cb"], "model.apple_search_ads_source.stg_apple_search_ads__keyword_report": ["model.apple_search_ads.apple_search_ads__keyword_report", "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__keyword_report_keyword_id__date_day.9f0099cff8", "test.apple_search_ads_source.not_null_stg_apple_search_ads__keyword_report_date_day.16098db928", "test.apple_search_ads_source.not_null_stg_apple_search_ads__keyword_report_keyword_id.501725b09e"], "model.apple_search_ads_source.stg_apple_search_ads__keyword_history": ["model.apple_search_ads.apple_search_ads__keyword_report", "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__keyword_history_keyword_id__modified_at.7b06162d24", "test.apple_search_ads_source.not_null_stg_apple_search_ads__keyword_history_keyword_id.889f83cfd2", "test.apple_search_ads_source.not_null_stg_apple_search_ads__keyword_history_modified_at.42fde5a287"], "model.apple_search_ads_source.stg_apple_search_ads__search_term_report": ["model.apple_search_ads.apple_search_ads__search_term_report", "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__search_term_report__fivetran_id__date_day.aad2a48344", "test.apple_search_ads_source.not_null_stg_apple_search_ads__search_term_report__fivetran_id.aa430d1dad", "test.apple_search_ads_source.not_null_stg_apple_search_ads__search_term_report_date_day.fd93df3302"], "model.apple_search_ads_source.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_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__ad_group_history_ad_group_id__modified_at.84af14c83b", "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_group_history_ad_group_id.dc128eecb7", "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_group_history_modified_at.e5d65fa28f"], "model.apple_search_ads_source.stg_apple_search_ads__ad_history": ["model.apple_search_ads.apple_search_ads__ad_report", "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__ad_history_ad_id__modified_at.38599b8cba", "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_history_ad_id.4ad3bde32a", "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_history_modified_at.2eea7e006d"], "model.apple_search_ads_source.stg_apple_search_ads__ad_group_report": ["model.apple_search_ads.apple_search_ads__ad_group_report", "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__ad_group_report_ad_group_id__date_day.a0fcc4e33c", "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_group_report_ad_group_id.a115f9cfc1", "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_group_report_date_day.4dfd46a43b"], "model.apple_search_ads_source.stg_apple_search_ads__search_term_report_tmp": ["model.apple_search_ads_source.stg_apple_search_ads__search_term_report", "model.apple_search_ads_source.stg_apple_search_ads__search_term_report"], "model.apple_search_ads_source.stg_apple_search_ads__campaign_history_tmp": ["model.apple_search_ads_source.stg_apple_search_ads__campaign_history", "model.apple_search_ads_source.stg_apple_search_ads__campaign_history"], "model.apple_search_ads_source.stg_apple_search_ads__keyword_history_tmp": ["model.apple_search_ads_source.stg_apple_search_ads__keyword_history", "model.apple_search_ads_source.stg_apple_search_ads__keyword_history"], "model.apple_search_ads_source.stg_apple_search_ads__ad_group_history_tmp": ["model.apple_search_ads_source.stg_apple_search_ads__ad_group_history", "model.apple_search_ads_source.stg_apple_search_ads__ad_group_history"], "model.apple_search_ads_source.stg_apple_search_ads__ad_group_report_tmp": ["model.apple_search_ads_source.stg_apple_search_ads__ad_group_report", "model.apple_search_ads_source.stg_apple_search_ads__ad_group_report"], "model.apple_search_ads_source.stg_apple_search_ads__ad_history_tmp": ["model.apple_search_ads_source.stg_apple_search_ads__ad_history", "model.apple_search_ads_source.stg_apple_search_ads__ad_history"], "model.apple_search_ads_source.stg_apple_search_ads__campaign_report_tmp": ["model.apple_search_ads_source.stg_apple_search_ads__campaign_report", "model.apple_search_ads_source.stg_apple_search_ads__campaign_report"], "model.apple_search_ads_source.stg_apple_search_ads__organization_tmp": ["model.apple_search_ads_source.stg_apple_search_ads__organization", "model.apple_search_ads_source.stg_apple_search_ads__organization"], "model.apple_search_ads_source.stg_apple_search_ads__keyword_report_tmp": ["model.apple_search_ads_source.stg_apple_search_ads__keyword_report", "model.apple_search_ads_source.stg_apple_search_ads__keyword_report"], "model.apple_search_ads_source.stg_apple_search_ads__ad_report_tmp": ["model.apple_search_ads_source.stg_apple_search_ads__ad_report", "model.apple_search_ads_source.stg_apple_search_ads__ad_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": [], "test.apple_search_ads.dbt_utils_unique_combination_of_columns_apple_search_ads__ad_group_report_organization_id__campaign_id__ad_group_id__date_day.19d180bab9": [], "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.dbt_utils_unique_combination_of_columns_apple_search_ads__ad_report_organization_id__campaign_id__ad_group_id__ad_id__date_day.54e27817a1": [], "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.dbt_utils_unique_combination_of_columns_apple_search_ads__campaign_report_organization_id__campaign_id__date_day.647e56213f": [], "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.dbt_utils_unique_combination_of_columns_apple_search_ads__keyword_report_organization_id__campaign_id__ad_group_id__keyword_id__date_day.78fb033a13": [], "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.dbt_utils_unique_combination_of_columns_apple_search_ads__organization_report_organization_id__date_day.8bc84fccc3": [], "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.dbt_utils_unique_combination_of_columns_apple_search_ads__search_term_report_search_term_text__date_day.e60fe79ec4": [], "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_group_history_modified_at.e5d65fa28f": [], "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_group_history_ad_group_id.dc128eecb7": [], "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__ad_group_history_ad_group_id__modified_at.84af14c83b": [], "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_group_report_ad_group_id.a115f9cfc1": [], "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_group_report_date_day.4dfd46a43b": [], "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__ad_group_report_ad_group_id__date_day.a0fcc4e33c": [], "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_history_modified_at.2eea7e006d": [], "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_history_ad_id.4ad3bde32a": [], "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__ad_history_ad_id__modified_at.38599b8cba": [], "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_report_date_day.e6252346d8": [], "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_report_ad_group_id.a397755e9f": [], "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_report_ad_id.d08e760c58": [], "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__ad_report_ad_id__date_day__ad_group_id.0d8d23c516": [], "test.apple_search_ads_source.not_null_stg_apple_search_ads__campaign_history_modified_at.f34a7a97c9": [], "test.apple_search_ads_source.not_null_stg_apple_search_ads__campaign_history_campaign_id.3f0f7502b8": [], "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__campaign_history_campaign_id__modified_at.317f970af9": [], "test.apple_search_ads_source.not_null_stg_apple_search_ads__campaign_report_campaign_id.b83941e728": [], "test.apple_search_ads_source.not_null_stg_apple_search_ads__campaign_report_date_day.c8dc10a6f3": [], "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__campaign_report_campaign_id__date_day.bad41b0481": [], "test.apple_search_ads_source.not_null_stg_apple_search_ads__keyword_history_modified_at.42fde5a287": [], "test.apple_search_ads_source.not_null_stg_apple_search_ads__keyword_history_keyword_id.889f83cfd2": [], "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__keyword_history_keyword_id__modified_at.7b06162d24": [], "test.apple_search_ads_source.not_null_stg_apple_search_ads__keyword_report_keyword_id.501725b09e": [], "test.apple_search_ads_source.not_null_stg_apple_search_ads__keyword_report_date_day.16098db928": [], "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__keyword_report_keyword_id__date_day.9f0099cff8": [], "test.apple_search_ads_source.not_null_stg_apple_search_ads__organization_organization_id.b013ce33cb": [], "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__organization_organization_id.8647048f7a": [], "test.apple_search_ads_source.not_null_stg_apple_search_ads__search_term_report__fivetran_id.aa430d1dad": [], "test.apple_search_ads_source.not_null_stg_apple_search_ads__search_term_report_date_day.fd93df3302": [], "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__search_term_report__fivetran_id__date_day.aad2a48344": [], "source.apple_search_ads_source.apple_search_ads.ad_group_history": ["model.apple_search_ads_source.stg_apple_search_ads__ad_group_history_tmp"], "source.apple_search_ads_source.apple_search_ads.ad_group_report": ["model.apple_search_ads_source.stg_apple_search_ads__ad_group_report_tmp"], "source.apple_search_ads_source.apple_search_ads.ad_history": ["model.apple_search_ads_source.stg_apple_search_ads__ad_history_tmp"], "source.apple_search_ads_source.apple_search_ads.ad_level_report": ["model.apple_search_ads_source.stg_apple_search_ads__ad_report_tmp"], "source.apple_search_ads_source.apple_search_ads.campaign_history": ["model.apple_search_ads_source.stg_apple_search_ads__campaign_history_tmp"], "source.apple_search_ads_source.apple_search_ads.campaign_report": ["model.apple_search_ads_source.stg_apple_search_ads__campaign_report_tmp"], "source.apple_search_ads_source.apple_search_ads.keyword_history": ["model.apple_search_ads_source.stg_apple_search_ads__keyword_history_tmp"], "source.apple_search_ads_source.apple_search_ads.keyword_report": ["model.apple_search_ads_source.stg_apple_search_ads__keyword_report_tmp"], "source.apple_search_ads_source.apple_search_ads.organization": ["model.apple_search_ads_source.stg_apple_search_ads__organization_tmp"], "source.apple_search_ads_source.apple_search_ads.search_term_report": ["model.apple_search_ads_source.stg_apple_search_ads__search_term_report_tmp"]}} \ No newline at end of file +{"metadata": {"dbt_schema_version": "https://schemas.getdbt.com/dbt/manifest/v7.json", "dbt_version": "1.3.0", "generated_at": "2022-12-20T03:04:49.522270Z", "invocation_id": "813fddce-ccfb-4c9e-be0f-4fb5725e66b7", "env": {}, "project_id": "b8a2464c562afb40124f0d47d8c7adc5", "user_id": "8929baf0-9bc1-477e-9a57-eb8b0db4da62", "send_anonymous_usage_stats": true, "adapter_type": "postgres"}, "nodes": {"seed.apple_search_ads_integration_tests.ad_group_report_data": {"compiled": true, "resource_type": "seed", "depends_on": {"macros": [], "nodes": []}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "materialized": "seed", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {"modification_time": "timestamp", "start_time": "timestamp", "end_time": "timestamp", "creation_time": "timestamp", "_fivetran_synced": "timestamp"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "quote_columns": false, "post-hook": [], "pre-hook": []}, "database": "postgres", "schema": "apple_search_ads_integration_tests", "fqn": ["apple_search_ads_integration_tests", "ad_group_report_data"], "unique_id": "seed.apple_search_ads_integration_tests.ad_group_report_data", "raw_code": "", "language": "sql", "package_name": "apple_search_ads_integration_tests", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests", "path": "ad_group_report_data.csv", "original_file_path": "seeds/ad_group_report_data.csv", "name": "ad_group_report_data", "alias": "ad_group_report_data", "checksum": {"name": "sha256", "checksum": "135ee77ac9c3aa146d4f0281b04312c1034c271276f215b27145bb99f83534f5"}, "tags": [], "refs": [], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": null, "build_path": null, "deferred": false, "unrendered_config": {"quote_columns": "{{ true if target.type == 'redshift' else false }}", "column_types": {"modification_time": "timestamp", "start_time": "timestamp", "end_time": "timestamp", "creation_time": "timestamp", "_fivetran_synced": "timestamp"}}, "created_at": 1671505473.207413, "compiled_code": "", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "\"postgres\".\"apple_search_ads_integration_tests\".\"ad_group_report_data\""}, "seed.apple_search_ads_integration_tests.ad_report_data": {"compiled": true, "resource_type": "seed", "depends_on": {"macros": [], "nodes": []}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "materialized": "seed", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {"modification_time": "timestamp", "start_time": "timestamp", "end_time": "timestamp", "creation_time": "timestamp", "_fivetran_synced": "timestamp"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "quote_columns": false, "post-hook": [], "pre-hook": []}, "database": "postgres", "schema": "apple_search_ads_integration_tests", "fqn": ["apple_search_ads_integration_tests", "ad_report_data"], "unique_id": "seed.apple_search_ads_integration_tests.ad_report_data", "raw_code": "", "language": "sql", "package_name": "apple_search_ads_integration_tests", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests", "path": "ad_report_data.csv", "original_file_path": "seeds/ad_report_data.csv", "name": "ad_report_data", "alias": "ad_report_data", "checksum": {"name": "sha256", "checksum": "beef859bd11dd339082a3e8d23414c5da7e30ae75ade28736a3dbdf292627708"}, "tags": [], "refs": [], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": null, "build_path": null, "deferred": false, "unrendered_config": {"quote_columns": "{{ true if target.type == 'redshift' else false }}", "column_types": {"modification_time": "timestamp", "start_time": "timestamp", "end_time": "timestamp", "creation_time": "timestamp", "_fivetran_synced": "timestamp"}}, "created_at": 1671505473.213254, "compiled_code": "", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "\"postgres\".\"apple_search_ads_integration_tests\".\"ad_report_data\""}, "seed.apple_search_ads_integration_tests.keyword_report_data": {"compiled": true, "resource_type": "seed", "depends_on": {"macros": [], "nodes": []}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "materialized": "seed", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {"modification_time": "timestamp", "start_time": "timestamp", "end_time": "timestamp", "creation_time": "timestamp", "_fivetran_synced": "timestamp"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "quote_columns": false, "post-hook": [], "pre-hook": []}, "database": "postgres", "schema": "apple_search_ads_integration_tests", "fqn": ["apple_search_ads_integration_tests", "keyword_report_data"], "unique_id": "seed.apple_search_ads_integration_tests.keyword_report_data", "raw_code": "", "language": "sql", "package_name": "apple_search_ads_integration_tests", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests", "path": "keyword_report_data.csv", "original_file_path": "seeds/keyword_report_data.csv", "name": "keyword_report_data", "alias": "keyword_report_data", "checksum": {"name": "sha256", "checksum": "6aafe7098ea6f18764856a6631b190de106462f83f8bb1d3c8fb91e2d3cfffee"}, "tags": [], "refs": [], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": null, "build_path": null, "deferred": false, "unrendered_config": {"quote_columns": "{{ true if target.type == 'redshift' else false }}", "column_types": {"modification_time": "timestamp", "start_time": "timestamp", "end_time": "timestamp", "creation_time": "timestamp", "_fivetran_synced": "timestamp"}}, "created_at": 1671505473.2145128, "compiled_code": "", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "\"postgres\".\"apple_search_ads_integration_tests\".\"keyword_report_data\""}, "seed.apple_search_ads_integration_tests.ad_history_data": {"compiled": true, "resource_type": "seed", "depends_on": {"macros": [], "nodes": []}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "materialized": "seed", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {"modification_time": "timestamp", "start_time": "timestamp", "end_time": "timestamp", "creation_time": "timestamp", "_fivetran_synced": "timestamp"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "quote_columns": false, "post-hook": [], "pre-hook": []}, "database": "postgres", "schema": "apple_search_ads_integration_tests", "fqn": ["apple_search_ads_integration_tests", "ad_history_data"], "unique_id": "seed.apple_search_ads_integration_tests.ad_history_data", "raw_code": "", "language": "sql", "package_name": "apple_search_ads_integration_tests", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests", "path": "ad_history_data.csv", "original_file_path": "seeds/ad_history_data.csv", "name": "ad_history_data", "alias": "ad_history_data", "checksum": {"name": "sha256", "checksum": "6b7e388b2b1ac23dd3f2e0cc1a781099a525e921a36da2fe83f52bd207066ea8"}, "tags": [], "refs": [], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": null, "build_path": null, "deferred": false, "unrendered_config": {"quote_columns": "{{ true if target.type == 'redshift' else false }}", "column_types": {"modification_time": "timestamp", "start_time": "timestamp", "end_time": "timestamp", "creation_time": "timestamp", "_fivetran_synced": "timestamp"}}, "created_at": 1671505473.215811, "compiled_code": "", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "\"postgres\".\"apple_search_ads_integration_tests\".\"ad_history_data\""}, "seed.apple_search_ads_integration_tests.ad_group_history_data": {"compiled": true, "resource_type": "seed", "depends_on": {"macros": [], "nodes": []}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "materialized": "seed", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {"modification_time": "timestamp", "start_time": "timestamp", "end_time": "timestamp", "creation_time": "timestamp", "_fivetran_synced": "timestamp"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "quote_columns": false, "post-hook": [], "pre-hook": []}, "database": "postgres", "schema": "apple_search_ads_integration_tests", "fqn": ["apple_search_ads_integration_tests", "ad_group_history_data"], "unique_id": "seed.apple_search_ads_integration_tests.ad_group_history_data", "raw_code": "", "language": "sql", "package_name": "apple_search_ads_integration_tests", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests", "path": "ad_group_history_data.csv", "original_file_path": "seeds/ad_group_history_data.csv", "name": "ad_group_history_data", "alias": "ad_group_history_data", "checksum": {"name": "sha256", "checksum": "a9cfeb9cc85210420753798963e582f647bc3fe966ef725b7d3cd061f65325c4"}, "tags": [], "refs": [], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": null, "build_path": null, "deferred": false, "unrendered_config": {"quote_columns": "{{ true if target.type == 'redshift' else false }}", "column_types": {"modification_time": "timestamp", "start_time": "timestamp", "end_time": "timestamp", "creation_time": "timestamp", "_fivetran_synced": "timestamp"}}, "created_at": 1671505473.217005, "compiled_code": "", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "\"postgres\".\"apple_search_ads_integration_tests\".\"ad_group_history_data\""}, "seed.apple_search_ads_integration_tests.campaign_history_data": {"compiled": true, "resource_type": "seed", "depends_on": {"macros": [], "nodes": []}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "materialized": "seed", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {"modification_time": "timestamp", "start_time": "timestamp", "end_time": "timestamp", "creation_time": "timestamp", "_fivetran_synced": "timestamp"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "quote_columns": false, "post-hook": [], "pre-hook": []}, "database": "postgres", "schema": "apple_search_ads_integration_tests", "fqn": ["apple_search_ads_integration_tests", "campaign_history_data"], "unique_id": "seed.apple_search_ads_integration_tests.campaign_history_data", "raw_code": "", "language": "sql", "package_name": "apple_search_ads_integration_tests", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests", "path": "campaign_history_data.csv", "original_file_path": "seeds/campaign_history_data.csv", "name": "campaign_history_data", "alias": "campaign_history_data", "checksum": {"name": "sha256", "checksum": "56fa1720930e88d590eb11b16d93d5c7e28e5f9bec57866047040a1a183ad3f3"}, "tags": [], "refs": [], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": null, "build_path": null, "deferred": false, "unrendered_config": {"quote_columns": "{{ true if target.type == 'redshift' else false }}", "column_types": {"modification_time": "timestamp", "start_time": "timestamp", "end_time": "timestamp", "creation_time": "timestamp", "_fivetran_synced": "timestamp"}}, "created_at": 1671505473.2182, "compiled_code": "", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "\"postgres\".\"apple_search_ads_integration_tests\".\"campaign_history_data\""}, "seed.apple_search_ads_integration_tests.campaign_report_data": {"compiled": true, "resource_type": "seed", "depends_on": {"macros": [], "nodes": []}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "materialized": "seed", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {"modification_time": "timestamp", "start_time": "timestamp", "end_time": "timestamp", "creation_time": "timestamp", "_fivetran_synced": "timestamp"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "quote_columns": false, "post-hook": [], "pre-hook": []}, "database": "postgres", "schema": "apple_search_ads_integration_tests", "fqn": ["apple_search_ads_integration_tests", "campaign_report_data"], "unique_id": "seed.apple_search_ads_integration_tests.campaign_report_data", "raw_code": "", "language": "sql", "package_name": "apple_search_ads_integration_tests", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests", "path": "campaign_report_data.csv", "original_file_path": "seeds/campaign_report_data.csv", "name": "campaign_report_data", "alias": "campaign_report_data", "checksum": {"name": "sha256", "checksum": "a4a374475156eb8d9ddc40c43cadbcc843efcf7a55180346d2d4b875c2791ab1"}, "tags": [], "refs": [], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": null, "build_path": null, "deferred": false, "unrendered_config": {"quote_columns": "{{ true if target.type == 'redshift' else false }}", "column_types": {"modification_time": "timestamp", "start_time": "timestamp", "end_time": "timestamp", "creation_time": "timestamp", "_fivetran_synced": "timestamp"}}, "created_at": 1671505473.21952, "compiled_code": "", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "\"postgres\".\"apple_search_ads_integration_tests\".\"campaign_report_data\""}, "seed.apple_search_ads_integration_tests.keyword_history_data": {"compiled": true, "resource_type": "seed", "depends_on": {"macros": [], "nodes": []}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "materialized": "seed", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {"modification_time": "timestamp", "start_time": "timestamp", "end_time": "timestamp", "creation_time": "timestamp", "_fivetran_synced": "timestamp"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "quote_columns": false, "post-hook": [], "pre-hook": []}, "database": "postgres", "schema": "apple_search_ads_integration_tests", "fqn": ["apple_search_ads_integration_tests", "keyword_history_data"], "unique_id": "seed.apple_search_ads_integration_tests.keyword_history_data", "raw_code": "", "language": "sql", "package_name": "apple_search_ads_integration_tests", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests", "path": "keyword_history_data.csv", "original_file_path": "seeds/keyword_history_data.csv", "name": "keyword_history_data", "alias": "keyword_history_data", "checksum": {"name": "sha256", "checksum": "9ad23801ae95fc44211fac6c893f67825e34df0e6ba4e967eeb4fe5c3391b86b"}, "tags": [], "refs": [], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": null, "build_path": null, "deferred": false, "unrendered_config": {"quote_columns": "{{ true if target.type == 'redshift' else false }}", "column_types": {"modification_time": "timestamp", "start_time": "timestamp", "end_time": "timestamp", "creation_time": "timestamp", "_fivetran_synced": "timestamp"}}, "created_at": 1671505473.2206872, "compiled_code": "", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "\"postgres\".\"apple_search_ads_integration_tests\".\"keyword_history_data\""}, "seed.apple_search_ads_integration_tests.search_term_report_data": {"compiled": true, "resource_type": "seed", "depends_on": {"macros": [], "nodes": []}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "materialized": "seed", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {"modification_time": "timestamp", "start_time": "timestamp", "end_time": "timestamp", "creation_time": "timestamp", "_fivetran_synced": "timestamp"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "quote_columns": false, "post-hook": [], "pre-hook": []}, "database": "postgres", "schema": "apple_search_ads_integration_tests", "fqn": ["apple_search_ads_integration_tests", "search_term_report_data"], "unique_id": "seed.apple_search_ads_integration_tests.search_term_report_data", "raw_code": "", "language": "sql", "package_name": "apple_search_ads_integration_tests", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests", "path": "search_term_report_data.csv", "original_file_path": "seeds/search_term_report_data.csv", "name": "search_term_report_data", "alias": "search_term_report_data", "checksum": {"name": "sha256", "checksum": "6add75b68a0f9a6f153a9fb83a682387a76a5b89d6dcd14fdbbcb5b418bb3b5a"}, "tags": [], "refs": [], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": null, "build_path": null, "deferred": false, "unrendered_config": {"quote_columns": "{{ true if target.type == 'redshift' else false }}", "column_types": {"modification_time": "timestamp", "start_time": "timestamp", "end_time": "timestamp", "creation_time": "timestamp", "_fivetran_synced": "timestamp"}}, "created_at": 1671505473.22184, "compiled_code": "", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "\"postgres\".\"apple_search_ads_integration_tests\".\"search_term_report_data\""}, "seed.apple_search_ads_integration_tests.organization_data": {"compiled": true, "resource_type": "seed", "depends_on": {"macros": [], "nodes": []}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "materialized": "seed", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {"modification_time": "timestamp", "start_time": "timestamp", "end_time": "timestamp", "creation_time": "timestamp", "_fivetran_synced": "timestamp"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "quote_columns": false, "post-hook": [], "pre-hook": []}, "database": "postgres", "schema": "apple_search_ads_integration_tests", "fqn": ["apple_search_ads_integration_tests", "organization_data"], "unique_id": "seed.apple_search_ads_integration_tests.organization_data", "raw_code": "", "language": "sql", "package_name": "apple_search_ads_integration_tests", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests", "path": "organization_data.csv", "original_file_path": "seeds/organization_data.csv", "name": "organization_data", "alias": "organization_data", "checksum": {"name": "sha256", "checksum": "bbb5878ab9c07bd1f391181a8321ea50476f37d25f36fd1d66e58d513336699c"}, "tags": [], "refs": [], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": null, "build_path": null, "deferred": false, "unrendered_config": {"quote_columns": "{{ true if target.type == 'redshift' else false }}", "column_types": {"modification_time": "timestamp", "start_time": "timestamp", "end_time": "timestamp", "creation_time": "timestamp", "_fivetran_synced": "timestamp"}}, "created_at": 1671505473.223001, "compiled_code": "", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "\"postgres\".\"apple_search_ads_integration_tests\".\"organization_data\""}, "model.apple_search_ads.apple_search_ads__ad_report": {"compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.fivetran_utils.persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__ad_report", "model.apple_search_ads_source.stg_apple_search_ads__ad_history", "model.apple_search_ads_source.stg_apple_search_ads__ad_group_history", "model.apple_search_ads_source.stg_apple_search_ads__campaign_history", "model.apple_search_ads_source.stg_apple_search_ads__organization"]}, "config": {"enabled": true, "alias": null, "schema": "apple_search_ads", "database": null, "tags": [], "meta": {}, "materialized": "table", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "post-hook": [], "pre-hook": []}, "database": "postgres", "schema": "apple_search_ads_integration_tests_apple_search_ads", "fqn": ["apple_search_ads", "apple_search_ads__ad_report"], "unique_id": "model.apple_search_ads.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 {{ var('ad_report') }}\n), \n\nad as (\n\n select * \n from {{ var('ad_history') }}\n where is_most_recent_record = True\n), \n\nad_group as (\n\n select * \n from {{ var('ad_group_history') }}\n where is_most_recent_record = True\n), \n\ncampaign as (\n\n select *\n from {{ var('campaign_history') }}\n where is_most_recent_record = True\n), \n\norganization as (\n\n select * \n from {{ var('organization') }}\n), \n\njoined as (\n\n select \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 ad.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,\n sum(report.redownloads) as redownloads,\n sum(report.new_downloads + report.redownloads) as total_downloads,\n sum(report.impressions) as impressions,\n sum(report.spend) as spend\n\n {{ fivetran_utils.persist_pass_through_columns(pass_through_variable='apple_search_ads__ad_passthrough_metrics', transform = 'sum') }}\n from report\n join ad \n on report.ad_id = ad.ad_id\n join ad_group \n on report.ad_group_id = ad_group.ad_group_id\n join campaign \n on report.campaign_id = campaign.campaign_id\n join organization \n on ad.organization_id = organization.organization_id\n {{ dbt_utils.group_by(11) }}\n)\n\nselect * \nfrom joined", "language": "sql", "package_name": "apple_search_ads", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads", "path": "apple_search_ads__ad_report.sql", "original_file_path": "models/apple_search_ads__ad_report.sql", "name": "apple_search_ads__ad_report", "alias": "apple_search_ads__ad_report", "checksum": {"name": "sha256", "checksum": "9be99b8581d2c85b4b11327ae3eef34d26121ed866e5762ff7f627b2c24b63a9"}, "tags": [], "refs": [["stg_apple_search_ads__ad_report"], ["stg_apple_search_ads__ad_history"], ["stg_apple_search_ads__ad_group_history"], ["stg_apple_search_ads__campaign_history"], ["stg_apple_search_ads__organization"]], "sources": [], "metrics": [], "description": "Each record represents the daily ad performance of each ad.", "columns": {"organization_id": {"name": "organization_id", "description": "Organization ID associated with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "organization_name": {"name": "organization_name", "description": "Organization name associated with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_id": {"name": "campaign_id", "description": "Campaign ID associated with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_name": {"name": "campaign_name", "description": "Campaign name associated with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "ad_group_id": {"name": "ad_group_id", "description": "Ad group ID associated with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "ad_group_name": {"name": "ad_group_name", "description": "Ad group name associated with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "ad_id": {"name": "ad_id", "description": "Ad ID associated with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "ad_name": {"name": "ad_name", "description": "Ad name associated with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "ad_status": {"name": "ad_status", "description": "The status of the ad associated with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "date_day": {"name": "date_day", "description": "Date of the report.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "currency": {"name": "currency", "description": "This currency value should match the respective organization's currency value.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "taps": {"name": "taps", "description": "Number of taps on ad group on given day.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "new_downloads": {"name": "new_downloads", "description": "App downloads from new users who have never before installed app of ad group in a given day.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "redownloads": {"name": "redownloads", "description": "Number of user downloads where user deletes app 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 of ad group in a given day.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_downloads": {"name": "total_downloads", "description": "The sum of new_downloads and redownloads.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "impressions": {"name": "impressions", "description": "The number of impressions of ad group in a given day.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "spend": {"name": "spend", "description": "The spend on ad group in the given day.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": "apple_search_ads://models/apple_search_ads.yml", "compiled_path": "target/compiled/apple_search_ads/models/apple_search_ads__ad_report.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "apple_search_ads", "materialized": "table", "enabled": true}, "created_at": 1671505473.458657, "compiled_code": "\n\nwith report as (\n\n select *\n from \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__ad_report\"\n), \n\nad as (\n\n select * \n from \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__ad_history\"\n where is_most_recent_record = True\n), \n\nad_group as (\n\n select * \n from \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__ad_group_history\"\n where is_most_recent_record = True\n), \n\ncampaign as (\n\n select *\n from \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__campaign_history\"\n where is_most_recent_record = True\n), \n\norganization as (\n\n select * \n from \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__organization\"\n), \n\njoined as (\n\n select \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 ad.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,\n sum(report.redownloads) as redownloads,\n sum(report.new_downloads + report.redownloads) as total_downloads,\n sum(report.impressions) as impressions,\n sum(report.spend) as spend\n\n \n\n\n\n\n from report\n join ad \n on report.ad_id = ad.ad_id\n join ad_group \n on report.ad_group_id = ad_group.ad_group_id\n join campaign \n on report.campaign_id = campaign.campaign_id\n join organization \n on ad.organization_id = organization.organization_id\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": [], "relation_name": "\"postgres\".\"apple_search_ads_integration_tests_apple_search_ads\".\"apple_search_ads__ad_report\""}, "model.apple_search_ads.apple_search_ads__ad_group_report": {"compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.fivetran_utils.persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__ad_group_report", "model.apple_search_ads_source.stg_apple_search_ads__ad_group_history", "model.apple_search_ads_source.stg_apple_search_ads__campaign_history", "model.apple_search_ads_source.stg_apple_search_ads__organization"]}, "config": {"enabled": true, "alias": null, "schema": "apple_search_ads", "database": null, "tags": [], "meta": {}, "materialized": "table", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "post-hook": [], "pre-hook": []}, "database": "postgres", "schema": "apple_search_ads_integration_tests_apple_search_ads", "fqn": ["apple_search_ads", "apple_search_ads__ad_group_report"], "unique_id": "model.apple_search_ads.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 {{ var('ad_group_report') }}\n), \n\nad_group as (\n\n select * \n from {{ var('ad_group_history') }}\n where is_most_recent_record = True\n), \n\ncampaign as (\n\n select *\n from {{ var('campaign_history') }}\n where is_most_recent_record = True\n), \n\norganization as (\n\n select * \n from {{ var('organization') }}\n), \n\njoined as (\n\n select \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.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,\n sum(report.redownloads) as redownloads,\n sum(report.new_downloads + report.redownloads) as total_downloads,\n sum(report.impressions) as impressions,\n sum(report.spend) as spend\n\n {{ fivetran_utils.persist_pass_through_columns(pass_through_variable='apple_search_ads__ad_group_passthrough_metrics', transform = 'sum') }}\n from report\n join ad_group \n on report.ad_group_id = ad_group.ad_group_id\n join campaign \n on ad_group.campaign_id = campaign.campaign_id\n join organization \n on ad_group.organization_id = organization.organization_id\n {{ dbt_utils.group_by(11) }}\n)\n\nselect * \nfrom joined", "language": "sql", "package_name": "apple_search_ads", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads", "path": "apple_search_ads__ad_group_report.sql", "original_file_path": "models/apple_search_ads__ad_group_report.sql", "name": "apple_search_ads__ad_group_report", "alias": "apple_search_ads__ad_group_report", "checksum": {"name": "sha256", "checksum": "a1edd5d4e81de3dadca268c67fc1bee311cab1edc7efe48a494c7017c7acdc80"}, "tags": [], "refs": [["stg_apple_search_ads__ad_group_report"], ["stg_apple_search_ads__ad_group_history"], ["stg_apple_search_ads__campaign_history"], ["stg_apple_search_ads__organization"]], "sources": [], "metrics": [], "description": "Each record represents the daily ad performance of each ad group.", "columns": {"organization_id": {"name": "organization_id", "description": "Organization ID associated with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "organization_name": {"name": "organization_name", "description": "Organization name associated with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_id": {"name": "campaign_id", "description": "Campaign ID associated with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_name": {"name": "campaign_name", "description": "Campaign name associated with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "ad_group_id": {"name": "ad_group_id", "description": "Ad group ID associated with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "ad_group_name": {"name": "ad_group_name", "description": "Ad group name associated with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "ad_group_status": {"name": "ad_group_status", "description": "The status of the ad group associated with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "start_at": {"name": "start_at", "description": "The start timestamp for this ad group.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "end_at": {"name": "end_at", "description": "The end timestamp for this ad group.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "date_day": {"name": "date_day", "description": "Date of the report.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "currency": {"name": "currency", "description": "This currency value should match the respective organization's currency value.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "taps": {"name": "taps", "description": "Number of taps on ad group on given day.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "new_downloads": {"name": "new_downloads", "description": "App downloads from new users who have never before installed app of ad group in a given day.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "redownloads": {"name": "redownloads", "description": "Number of user downloads where user deletes app 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 of ad group in a given day.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_downloads": {"name": "total_downloads", "description": "The sum of new_downloads and redownloads.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "impressions": {"name": "impressions", "description": "The number of impressions of ad group in a given day.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "spend": {"name": "spend", "description": "The spend on ad group in the given day.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": "apple_search_ads://models/apple_search_ads.yml", "compiled_path": "target/compiled/apple_search_ads/models/apple_search_ads__ad_group_report.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "apple_search_ads", "materialized": "table", "enabled": true}, "created_at": 1671505473.455909, "compiled_code": "\n\nwith report as (\n\n select *\n from \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__ad_group_report\"\n), \n\nad_group as (\n\n select * \n from \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__ad_group_history\"\n where is_most_recent_record = True\n), \n\ncampaign as (\n\n select *\n from \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__campaign_history\"\n where is_most_recent_record = True\n), \n\norganization as (\n\n select * \n from \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__organization\"\n), \n\njoined as (\n\n select \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.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,\n sum(report.redownloads) as redownloads,\n sum(report.new_downloads + report.redownloads) as total_downloads,\n sum(report.impressions) as impressions,\n sum(report.spend) as spend\n\n \n\n\n\n\n from report\n join ad_group \n on report.ad_group_id = ad_group.ad_group_id\n join campaign \n on ad_group.campaign_id = campaign.campaign_id\n join organization \n on ad_group.organization_id = organization.organization_id\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": [], "relation_name": "\"postgres\".\"apple_search_ads_integration_tests_apple_search_ads\".\"apple_search_ads__ad_group_report\""}, "model.apple_search_ads.apple_search_ads__keyword_report": {"compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.fivetran_utils.persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__keyword_report", "model.apple_search_ads_source.stg_apple_search_ads__keyword_history", "model.apple_search_ads_source.stg_apple_search_ads__ad_group_history", "model.apple_search_ads_source.stg_apple_search_ads__campaign_history", "model.apple_search_ads_source.stg_apple_search_ads__organization"]}, "config": {"enabled": true, "alias": null, "schema": "apple_search_ads", "database": null, "tags": [], "meta": {}, "materialized": "table", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "post-hook": [], "pre-hook": []}, "database": "postgres", "schema": "apple_search_ads_integration_tests_apple_search_ads", "fqn": ["apple_search_ads", "apple_search_ads__keyword_report"], "unique_id": "model.apple_search_ads.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 {{ var('keyword_report') }}\n), \n\nkeyword as (\n\n select *\n from {{ var('keyword_history') }}\n where is_most_recent_record = True\n), \n\nad_group as (\n\n select *\n from {{ var('ad_group_history') }}\n where is_most_recent_record = True\n), \n\ncampaign as (\n\n select *\n from {{ var('campaign_history') }}\n where is_most_recent_record = True\n), \n\norganization as (\n\n select * \n from {{ var('organization') }}\n), \n\njoined as (\n\n select \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 keyword.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,\n sum(report.redownloads) as redownloads,\n sum(report.new_downloads + report.redownloads) as total_downloads,\n sum(report.impressions) as impressions,\n sum(report.spend) as spend\n\n {{ fivetran_utils.persist_pass_through_columns(pass_through_variable='apple_search_ads__keyword_passthrough_metrics', transform = 'sum') }}\n from report\n join keyword \n on report.keyword_id = keyword.keyword_id\n join ad_group \n on keyword.ad_group_id = ad_group.ad_group_id\n join campaign \n on ad_group.campaign_id = campaign.campaign_id\n join organization \n on ad_group.organization_id = organization.organization_id\n {{ dbt_utils.group_by(12) }}\n)\n\nselect * \nfrom joined", "language": "sql", "package_name": "apple_search_ads", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads", "path": "apple_search_ads__keyword_report.sql", "original_file_path": "models/apple_search_ads__keyword_report.sql", "name": "apple_search_ads__keyword_report", "alias": "apple_search_ads__keyword_report", "checksum": {"name": "sha256", "checksum": "91250ca8167dc8fee98582ff093d56a498b854e5c66a51325076191016bfb0e7"}, "tags": [], "refs": [["stg_apple_search_ads__keyword_report"], ["stg_apple_search_ads__keyword_history"], ["stg_apple_search_ads__ad_group_history"], ["stg_apple_search_ads__campaign_history"], ["stg_apple_search_ads__organization"]], "sources": [], "metrics": [], "description": "Each record represents the daily ad performance of each creative set.", "columns": {"organization_id": {"name": "organization_id", "description": "Organization ID associated with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "organization_name": {"name": "organization_name", "description": "Organization name associated with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_id": {"name": "campaign_id", "description": "Campaign ID associated with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_name": {"name": "campaign_name", "description": "Campaign name associated with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "ad_group_id": {"name": "ad_group_id", "description": "Ad group ID associated with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "ad_group_name": {"name": "ad_group_name", "description": "Ad group name associated with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "keyword_id": {"name": "keyword_id", "description": "Creative set name associatd with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "keyword_text": {"name": "keyword_text", "description": "Creative set ID associated with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "match_type": {"name": "match_type", "description": "Controls how ads are matched to user searches; EXACT or BROAD.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "date_day": {"name": "date_day", "description": "Date of the report.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "currency": {"name": "currency", "description": "This currency value should match the respective organization's currency value.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "keyword_status": {"name": "keyword_status", "description": "The status of the keyword associated with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "taps": {"name": "taps", "description": "Number of taps on keyword on given day.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "new_downloads": {"name": "new_downloads", "description": "App downloads from new users who have never before installed app of keyword in a given day.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "redownloads": {"name": "redownloads", "description": "Number of user downloads where user deletes app 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 of keyword in a given day.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_downloads": {"name": "total_downloads", "description": "The sum of new_downloads and redownloads.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "impressions": {"name": "impressions", "description": "The number of impressions of keyword in a given day.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "spend": {"name": "spend", "description": "The spend on keyword in the given day.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": "apple_search_ads://models/apple_search_ads.yml", "compiled_path": "target/compiled/apple_search_ads/models/apple_search_ads__keyword_report.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "apple_search_ads", "materialized": "table", "enabled": true}, "created_at": 1671505473.46432, "compiled_code": "\n\nwith report as (\n\n select *\n from \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__keyword_report\"\n), \n\nkeyword as (\n\n select *\n from \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__keyword_history\"\n where is_most_recent_record = True\n), \n\nad_group as (\n\n select *\n from \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__ad_group_history\"\n where is_most_recent_record = True\n), \n\ncampaign as (\n\n select *\n from \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__campaign_history\"\n where is_most_recent_record = True\n), \n\norganization as (\n\n select * \n from \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__organization\"\n), \n\njoined as (\n\n select \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 keyword.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,\n sum(report.redownloads) as redownloads,\n sum(report.new_downloads + report.redownloads) as total_downloads,\n sum(report.impressions) as impressions,\n sum(report.spend) as spend\n\n \n\n\n\n\n from report\n join keyword \n on report.keyword_id = keyword.keyword_id\n join ad_group \n on keyword.ad_group_id = ad_group.ad_group_id\n join campaign \n on ad_group.campaign_id = campaign.campaign_id\n join organization \n on ad_group.organization_id = organization.organization_id\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": [], "relation_name": "\"postgres\".\"apple_search_ads_integration_tests_apple_search_ads\".\"apple_search_ads__keyword_report\""}, "model.apple_search_ads.apple_search_ads__search_term_report": {"compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.fivetran_utils.persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__search_term_report", "model.apple_search_ads_source.stg_apple_search_ads__campaign_history", "model.apple_search_ads_source.stg_apple_search_ads__organization"]}, "config": {"enabled": true, "alias": null, "schema": "apple_search_ads", "database": null, "tags": [], "meta": {}, "materialized": "table", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "post-hook": [], "pre-hook": []}, "database": "postgres", "schema": "apple_search_ads_integration_tests_apple_search_ads", "fqn": ["apple_search_ads", "apple_search_ads__search_term_report"], "unique_id": "model.apple_search_ads.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 {{ var('search_term_report') }}\n), \n\ncampaign as (\n\n select *\n from {{ var('campaign_history') }}\n where is_most_recent_record = True\n), \n\norganization as (\n\n select * \n from {{ var('organization') }}\n), \n\njoined as (\n\n select \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 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,\n sum(report.redownloads) as redownloads,\n sum(report.new_downloads + report.redownloads) as total_downloads,\n sum(report.impressions) as impressions,\n sum(report.spend) as spend\n\n {{ fivetran_utils.persist_pass_through_columns(pass_through_variable='apple_search_ads__search_term_passthrough_metrics', transform = 'sum') }}\n from report\n join campaign \n on report.campaign_id = campaign.campaign_id\n join organization \n on campaign.organization_id = organization.organization_id\n where report.search_term_text is not null\n {{ dbt_utils.group_by(12) }}\n)\n\nselect * \nfrom joined", "language": "sql", "package_name": "apple_search_ads", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads", "path": "apple_search_ads__search_term_report.sql", "original_file_path": "models/apple_search_ads__search_term_report.sql", "name": "apple_search_ads__search_term_report", "alias": "apple_search_ads__search_term_report", "checksum": {"name": "sha256", "checksum": "4827d710dac6b2e632dcf3ba421a8166d719d1ae59e98128736b8689cf4039a1"}, "tags": [], "refs": [["stg_apple_search_ads__search_term_report"], ["stg_apple_search_ads__campaign_history"], ["stg_apple_search_ads__organization"]], "sources": [], "metrics": [], "description": "Each record represents the daily ad performance of each search term, only includes records with search term values.", "columns": {"organization_id": {"name": "organization_id", "description": "Organization ID associated with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "organization_name": {"name": "organization_name", "description": "Organization name associated with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_id": {"name": "campaign_id", "description": "Campaign ID associated with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_name": {"name": "campaign_name", "description": "Campaign name associated with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "ad_group_id": {"name": "ad_group_id", "description": "Ad group ID associated with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "ad_group_name": {"name": "ad_group_name", "description": "Ad group name associated with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "match_type": {"name": "match_type", "description": "Controls how ads are matched to user searches; EXACT or BROAD.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "date_day": {"name": "date_day", "description": "Date of the report.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "search_term_text": {"name": "search_term_text", "description": "Search term text.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "currency": {"name": "currency", "description": "This currency value should match the respective organization's currency value.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "taps": {"name": "taps", "description": "Number of taps on organization on given day.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "new_downloads": {"name": "new_downloads", "description": "App downloads from new users who have never before installed app of organization in a given day.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "redownloads": {"name": "redownloads", "description": "Number of user downloads where user deletes app 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 of organization in a given day.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_downloads": {"name": "total_downloads", "description": "The sum of new_downloads and redownloads.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "impressions": {"name": "impressions", "description": "The number of impressions of organization in a given day.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "spend": {"name": "spend", "description": "The spend on organization in the given day.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": "apple_search_ads://models/apple_search_ads.yml", "compiled_path": "target/compiled/apple_search_ads/models/apple_search_ads__search_term_report.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "apple_search_ads", "materialized": "table", "enabled": true}, "created_at": 1671505473.468446, "compiled_code": "\n\nwith report as (\n\n select *\n from \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__search_term_report\"\n), \n\ncampaign as (\n\n select *\n from \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__campaign_history\"\n where is_most_recent_record = True\n), \n\norganization as (\n\n select * \n from \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__organization\"\n), \n\njoined as (\n\n select \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 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,\n sum(report.redownloads) as redownloads,\n sum(report.new_downloads + report.redownloads) as total_downloads,\n sum(report.impressions) as impressions,\n sum(report.spend) as spend\n\n \n\n\n\n\n from report\n join campaign \n on report.campaign_id = campaign.campaign_id\n join organization \n on campaign.organization_id = organization.organization_id\n where report.search_term_text is not null\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": [], "relation_name": "\"postgres\".\"apple_search_ads_integration_tests_apple_search_ads\".\"apple_search_ads__search_term_report\""}, "model.apple_search_ads.apple_search_ads__campaign_report": {"compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.fivetran_utils.persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__campaign_report", "model.apple_search_ads_source.stg_apple_search_ads__campaign_history", "model.apple_search_ads_source.stg_apple_search_ads__organization"]}, "config": {"enabled": true, "alias": null, "schema": "apple_search_ads", "database": null, "tags": [], "meta": {}, "materialized": "table", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "post-hook": [], "pre-hook": []}, "database": "postgres", "schema": "apple_search_ads_integration_tests_apple_search_ads", "fqn": ["apple_search_ads", "apple_search_ads__campaign_report"], "unique_id": "model.apple_search_ads.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 {{ var('campaign_report') }}\n\n), \n\ncampaign as (\n\n select *\n from {{ var('campaign_history') }}\n where is_most_recent_record = True\n), \n\norganization as (\n\n select * \n from {{ var('organization') }}\n\n), \n\njoined as (\n\n select \n report.date_day,\n campaign.organization_id,\n organization.organization_name,\n campaign.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,\n sum(report.redownloads) as redownloads,\n sum(report.new_downloads + report.redownloads) as total_downloads,\n sum(report.impressions) as impressions,\n sum(report.spend) as spend\n\n {{ fivetran_utils.persist_pass_through_columns(pass_through_variable='apple_search_ads__campaign_passthrough_metrics', transform = 'sum') }}\n from report\n join campaign \n on report.campaign_id = campaign.campaign_id\n join organization \n on campaign.organization_id = organization.organization_id\n {{ dbt_utils.group_by(9) }}\n)\n\nselect * \nfrom joined", "language": "sql", "package_name": "apple_search_ads", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads", "path": "apple_search_ads__campaign_report.sql", "original_file_path": "models/apple_search_ads__campaign_report.sql", "name": "apple_search_ads__campaign_report", "alias": "apple_search_ads__campaign_report", "checksum": {"name": "sha256", "checksum": "d555ffbfe1f914afd50ba592ab961f1ebdb40a4d4315c0696f1c80738930080f"}, "tags": [], "refs": [["stg_apple_search_ads__campaign_report"], ["stg_apple_search_ads__campaign_history"], ["stg_apple_search_ads__organization"]], "sources": [], "metrics": [], "description": "Each record represents the daily ad performance of each campaign.", "columns": {"organization_id": {"name": "organization_id", "description": "Organization ID associated with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "organization_name": {"name": "organization_name", "description": "Organization name associated with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_id": {"name": "campaign_id", "description": "Campaign ID associated with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_name": {"name": "campaign_name", "description": "Campaign name associated with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_status": {"name": "campaign_status", "description": "The status of the campaign associted with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "start_at": {"name": "start_at", "description": "The start timestamp of this campaign.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "end_at": {"name": "end_at", "description": "The end timestamp of this campaign.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "date_day": {"name": "date_day", "description": "Date of the report.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "currency": {"name": "currency", "description": "This currency value should match the respective organization's currency value.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "taps": {"name": "taps", "description": "Number of taps on campaign on given day.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "new_downloads": {"name": "new_downloads", "description": "App downloads from new users who have never before installed app of campaign in a given day.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "redownloads": {"name": "redownloads", "description": "Number of user downloads where user deletes app 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 of campaign in a given day.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_downloads": {"name": "total_downloads", "description": "The sum of new_downloads and redownloads.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "impressions": {"name": "impressions", "description": "The number of impressions of campaign in a given day.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "spend": {"name": "spend", "description": "The spend on campaign in the given day.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": "apple_search_ads://models/apple_search_ads.yml", "compiled_path": "target/compiled/apple_search_ads/models/apple_search_ads__campaign_report.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "apple_search_ads", "materialized": "table", "enabled": true}, "created_at": 1671505473.461026, "compiled_code": "\n\nwith report as (\n \n select *\n from \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__campaign_report\"\n\n), \n\ncampaign as (\n\n select *\n from \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__campaign_history\"\n where is_most_recent_record = True\n), \n\norganization as (\n\n select * \n from \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__organization\"\n\n), \n\njoined as (\n\n select \n report.date_day,\n campaign.organization_id,\n organization.organization_name,\n campaign.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,\n sum(report.redownloads) as redownloads,\n sum(report.new_downloads + report.redownloads) as total_downloads,\n sum(report.impressions) as impressions,\n sum(report.spend) as spend\n\n \n\n\n\n\n from report\n join campaign \n on report.campaign_id = campaign.campaign_id\n join organization \n on campaign.organization_id = organization.organization_id\n group by 1,2,3,4,5,6,7,8,9\n)\n\nselect * \nfrom joined", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "\"postgres\".\"apple_search_ads_integration_tests_apple_search_ads\".\"apple_search_ads__campaign_report\""}, "model.apple_search_ads.apple_search_ads__organization_report": {"compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.fivetran_utils.persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__campaign_report", "model.apple_search_ads_source.stg_apple_search_ads__campaign_history", "model.apple_search_ads_source.stg_apple_search_ads__organization"]}, "config": {"enabled": true, "alias": null, "schema": "apple_search_ads", "database": null, "tags": [], "meta": {}, "materialized": "table", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "post-hook": [], "pre-hook": []}, "database": "postgres", "schema": "apple_search_ads_integration_tests_apple_search_ads", "fqn": ["apple_search_ads", "apple_search_ads__organization_report"], "unique_id": "model.apple_search_ads.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 {{ var('campaign_report') }}\n), \n\ncampaign as (\n\n select *\n from {{ var('campaign_history') }}\n where is_most_recent_record = True\n), \n\norganization as (\n\n select * \n from {{ var('organization') }}\n), \n\njoined as (\n\n select \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,\n sum(report.redownloads) as redownloads,\n sum(report.new_downloads + report.redownloads) as total_downloads,\n sum(report.impressions) as impressions,\n sum(report.spend) as spend\n\n {{ fivetran_utils.persist_pass_through_columns(pass_through_variable='apple_search_ads__campaign_passthrough_metrics', transform = 'sum') }}\n from report\n join campaign \n on report.campaign_id = campaign.campaign_id\n join organization \n on campaign.organization_id = organization.organization_id\n {{ dbt_utils.group_by(4) }}\n)\n\nselect * \nfrom joined", "language": "sql", "package_name": "apple_search_ads", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads", "path": "apple_search_ads__organization_report.sql", "original_file_path": "models/apple_search_ads__organization_report.sql", "name": "apple_search_ads__organization_report", "alias": "apple_search_ads__organization_report", "checksum": {"name": "sha256", "checksum": "47084fe8809edaeeda722e20590b19c6488687d05ad654b8fef4a0021088e0a2"}, "tags": [], "refs": [["stg_apple_search_ads__campaign_report"], ["stg_apple_search_ads__campaign_history"], ["stg_apple_search_ads__organization"]], "sources": [], "metrics": [], "description": "Each record represents the daily ad performance of each organization.", "columns": {"organization_id": {"name": "organization_id", "description": "Organization ID associated with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "organization_name": {"name": "organization_name", "description": "Organization name associated with this record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "date_day": {"name": "date_day", "description": "Date of the report.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "currency": {"name": "currency", "description": "This currency value should match the respective organization's currency value.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "taps": {"name": "taps", "description": "Number of taps on organization on given day.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "new_downloads": {"name": "new_downloads", "description": "App downloads from new users who have never before installed app of organization in a given day.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "redownloads": {"name": "redownloads", "description": "Number of user downloads where user deletes app 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 of organization in a given day.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "total_downloads": {"name": "total_downloads", "description": "The sum of new_downloads and redownloads.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "impressions": {"name": "impressions", "description": "The number of impressions of organization in a given day.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "spend": {"name": "spend", "description": "The spend on organization in the given day.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": "apple_search_ads://models/apple_search_ads.yml", "compiled_path": "target/compiled/apple_search_ads/models/apple_search_ads__organization_report.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "apple_search_ads", "materialized": "table", "enabled": true}, "created_at": 1671505473.465953, "compiled_code": "\n\nwith report as (\n \n select *\n from \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__campaign_report\"\n), \n\ncampaign as (\n\n select *\n from \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__campaign_history\"\n where is_most_recent_record = True\n), \n\norganization as (\n\n select * \n from \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__organization\"\n), \n\njoined as (\n\n select \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,\n sum(report.redownloads) as redownloads,\n sum(report.new_downloads + report.redownloads) as total_downloads,\n sum(report.impressions) as impressions,\n sum(report.spend) as spend\n\n \n\n\n\n\n from report\n join campaign \n on report.campaign_id = campaign.campaign_id\n join organization \n on campaign.organization_id = organization.organization_id\n group by 1,2,3,4\n)\n\nselect * \nfrom joined", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "\"postgres\".\"apple_search_ads_integration_tests_apple_search_ads\".\"apple_search_ads__organization_report\""}, "model.apple_search_ads_source.stg_apple_search_ads__campaign_history": {"compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.apple_search_ads_source.get_campaign_history_columns", "macro.fivetran_utils.fill_staging_columns"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__campaign_history_tmp", "model.apple_search_ads_source.stg_apple_search_ads__campaign_history_tmp"]}, "config": {"enabled": true, "alias": null, "schema": "apple_search_ads_source", "database": null, "tags": [], "meta": {}, "materialized": "table", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "post-hook": [], "pre-hook": []}, "database": "postgres", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "fqn": ["apple_search_ads_source", "stg_apple_search_ads__campaign_history"], "unique_id": "model.apple_search_ads_source.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 from base\n),\n\nfinal as (\n \n select\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", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "stg_apple_search_ads__campaign_history.sql", "original_file_path": "models/stg_apple_search_ads__campaign_history.sql", "name": "stg_apple_search_ads__campaign_history", "alias": "stg_apple_search_ads__campaign_history", "checksum": {"name": "sha256", "checksum": "294e54bc10f47e44786be1c445e764b49464643d75c0bf7a4fc3a38f3868e0de"}, "tags": [], "refs": [["stg_apple_search_ads__campaign_history_tmp"], ["stg_apple_search_ads__campaign_history_tmp"]], "sources": [], "metrics": [], "description": "Each record represents a version of a campaign in Apple Search Ads.", "columns": {"modified_at": {"name": "modified_at", "description": "Timestamp of when the campaign object was last modified.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "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, "quote": null, "tags": []}, "campaign_id": {"name": "campaign_id", "description": "Campaign ID associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "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, "quote": null, "tags": []}, "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, "quote": null, "tags": []}, "campaign_name": {"name": "campaign_name", "description": "Campaign name for the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "organization_id": {"name": "organization_id", "description": "Organization ID associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "status": {"name": "status", "description": "The current status of the campaign, values include ENABLED and PAUSED.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": "apple_search_ads_source://models/stg_apple_search_ads.yml", "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads__campaign_history.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "apple_search_ads_source", "materialized": "table", "enabled": true}, "created_at": 1671505473.541017, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__campaign_history_tmp\"\n),\n\nfields as (\n\n select\n \n \n \n end_time\n \n as \n \n end_time\n \n, \n \n \n id\n \n as \n \n id\n \n, \n \n \n modification_time\n \n as \n \n modification_time\n \n, \n \n \n name\n \n as \n \n name\n \n, \n \n \n organization_id\n \n as \n \n organization_id\n \n, \n \n \n start_time\n \n as \n \n start_time\n \n, \n \n \n status\n \n as \n \n status\n \n\n\n\n \n from base\n),\n\nfinal as (\n \n select\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": [], "relation_name": "\"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__campaign_history\""}, "model.apple_search_ads_source.stg_apple_search_ads__ad_report": {"compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.apple_search_ads_source.get_ad_level_report_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.fill_pass_through_columns"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__ad_report_tmp", "model.apple_search_ads_source.stg_apple_search_ads__ad_report_tmp"]}, "config": {"enabled": true, "alias": null, "schema": "apple_search_ads_source", "database": null, "tags": [], "meta": {}, "materialized": "table", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "post-hook": [], "pre-hook": []}, "database": "postgres", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "fqn": ["apple_search_ads_source", "stg_apple_search_ads__ad_report"], "unique_id": "model.apple_search_ads_source.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 from base\n),\n\nfinal as (\n \n select \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 new_downloads,\n redownloads,\n taps\n\n {{ fivetran_utils.fill_pass_through_columns('apple_search_ads__ad_passthrough_metrics') }}\n from fields\n)\n\nselect *\nfrom final", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "stg_apple_search_ads__ad_report.sql", "original_file_path": "models/stg_apple_search_ads__ad_report.sql", "name": "stg_apple_search_ads__ad_report", "alias": "stg_apple_search_ads__ad_report", "checksum": {"name": "sha256", "checksum": "45019dc2d949eecadbbd9d4a052049a60dca00c32f726da678972fa8bdadd1f6"}, "tags": [], "refs": [["stg_apple_search_ads__ad_report_tmp"], ["stg_apple_search_ads__ad_report_tmp"]], "sources": [], "metrics": [], "description": "Each record represents the daily performance of an ad in Apple Search Ads.", "columns": {"date_day": {"name": "date_day", "description": "Date for daily report aggregation.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_id": {"name": "campaign_id", "description": "Campaign ID associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "ad_group_id": {"name": "ad_group_id", "description": "Ad group ID associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "ad_id": {"name": "ad_id", "description": "Ad ID associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "impressions": {"name": "impressions", "description": "Number of times your ad appeared in App Store search results.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "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, "quote": null, "tags": []}, "currency": {"name": "currency", "description": "This currency value should match the respective organization's currency value.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "new_downloads": {"name": "new_downloads", "description": "App downloads from new users who have never before installed the respective app.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "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.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "taps": {"name": "taps", "description": "The number of times ad was tapped by users within the reporting time period.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": "apple_search_ads_source://models/stg_apple_search_ads.yml", "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads__ad_report.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "apple_search_ads_source", "materialized": "table", "enabled": true}, "created_at": 1671505473.5395572, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__ad_report_tmp\"\n),\n\nfields as (\n\n select\n \n \n \n ad_group_id\n \n as \n \n ad_group_id\n \n, \n \n \n ad_id\n \n as \n \n ad_id\n \n, \n \n \n campaign_id\n \n as \n \n campaign_id\n \n, \n \n \n date\n \n as \n \n date\n \n, \n \n \n impressions\n \n as \n \n impressions\n \n, \n \n \n local_spend_amount\n \n as \n \n local_spend_amount\n \n, \n \n \n local_spend_currency\n \n as \n \n local_spend_currency\n \n, \n \n \n new_downloads\n \n as \n \n new_downloads\n \n, \n \n \n redownloads\n \n as \n \n redownloads\n \n, \n \n \n taps\n \n as \n \n taps\n \n\n\n\n from base\n),\n\nfinal as (\n \n select \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 new_downloads,\n redownloads,\n taps\n\n \n\n\n\n\n from fields\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "\"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__ad_report\""}, "model.apple_search_ads_source.stg_apple_search_ads__campaign_report": {"compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.apple_search_ads_source.get_campaign_report_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.fill_pass_through_columns"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__campaign_report_tmp", "model.apple_search_ads_source.stg_apple_search_ads__campaign_report_tmp"]}, "config": {"enabled": true, "alias": null, "schema": "apple_search_ads_source", "database": null, "tags": [], "meta": {}, "materialized": "table", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "post-hook": [], "pre-hook": []}, "database": "postgres", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "fqn": ["apple_search_ads_source", "stg_apple_search_ads__campaign_report"], "unique_id": "model.apple_search_ads_source.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 from base\n),\n\nfinal as (\n \n select \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 new_downloads,\n redownloads,\n taps\n\n {{ fivetran_utils.fill_pass_through_columns('apple_search_ads__campaign_passthrough_metrics') }}\n from fields\n)\n\nselect * \nfrom final", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "stg_apple_search_ads__campaign_report.sql", "original_file_path": "models/stg_apple_search_ads__campaign_report.sql", "name": "stg_apple_search_ads__campaign_report", "alias": "stg_apple_search_ads__campaign_report", "checksum": {"name": "sha256", "checksum": "c4681d203c58d68501b9d2d3a84fc28598e9705eb4cc7f4496be52e3209768d3"}, "tags": [], "refs": [["stg_apple_search_ads__campaign_report_tmp"], ["stg_apple_search_ads__campaign_report_tmp"]], "sources": [], "metrics": [], "description": "Each record represents the daily performance of a campaign in Apple Search Ads.", "columns": {"campaign_id": {"name": "campaign_id", "description": "Campaign ID associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "date_day": {"name": "date_day", "description": "Date for daily report aggregation.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "impressions": {"name": "impressions", "description": "Number of times your ad appeared in App Store search results.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "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, "quote": null, "tags": []}, "currency": {"name": "currency", "description": "This currency value should match the respective organization's currency value.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "new_downloads": {"name": "new_downloads", "description": "App downloads from new users who have never before installed the respective app.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "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.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "taps": {"name": "taps", "description": "The number of times ad was tapped by users within the reporting time period.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": "apple_search_ads_source://models/stg_apple_search_ads.yml", "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads__campaign_report.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "apple_search_ads_source", "materialized": "table", "enabled": true}, "created_at": 1671505473.5425029, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__campaign_report_tmp\"\n),\n\nfields as (\n\n select\n \n \n \n date\n \n as \n \n date\n \n, \n \n \n id\n \n as \n \n id\n \n, \n \n \n impressions\n \n as \n \n impressions\n \n, \n \n \n local_spend_amount\n \n as \n \n local_spend_amount\n \n, \n \n \n local_spend_currency\n \n as \n \n local_spend_currency\n \n, \n \n \n new_downloads\n \n as \n \n new_downloads\n \n, \n \n \n redownloads\n \n as \n \n redownloads\n \n, \n \n \n taps\n \n as \n \n taps\n \n\n\n\n from base\n),\n\nfinal as (\n \n select \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 new_downloads,\n redownloads,\n taps\n\n \n\n\n\n\n from fields\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "\"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__campaign_report\""}, "model.apple_search_ads_source.stg_apple_search_ads__organization": {"compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.apple_search_ads_source.get_organization_columns", "macro.fivetran_utils.fill_staging_columns"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__organization_tmp", "model.apple_search_ads_source.stg_apple_search_ads__organization_tmp"]}, "config": {"enabled": true, "alias": null, "schema": "apple_search_ads_source", "database": null, "tags": [], "meta": {}, "materialized": "table", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "post-hook": [], "pre-hook": []}, "database": "postgres", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "fqn": ["apple_search_ads_source", "stg_apple_search_ads__organization"], "unique_id": "model.apple_search_ads_source.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 from base\n),\n\nfinal as (\n \n select \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", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "stg_apple_search_ads__organization.sql", "original_file_path": "models/stg_apple_search_ads__organization.sql", "name": "stg_apple_search_ads__organization", "alias": "stg_apple_search_ads__organization", "checksum": {"name": "sha256", "checksum": "24d3ee4e2d050e8ade0b3222ea535ed1837d2ea4265f00cf3f3b7b67a7a30dab"}, "tags": [], "refs": [["stg_apple_search_ads__organization_tmp"], ["stg_apple_search_ads__organization_tmp"]], "sources": [], "metrics": [], "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, "quote": null, "tags": []}, "currency": {"name": "currency", "description": "Specified currency for respective organization.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "payment_model": {"name": "payment_model", "description": "Values include 'LOC', 'PAYG' or (payment method hasn't been set).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "organization_name": {"name": "organization_name", "description": "Name of organization.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "time_zone": {"name": "time_zone", "description": "Organization default timezone; values can be ORTZ or UTC.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": "apple_search_ads_source://models/stg_apple_search_ads.yml", "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads__organization.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "apple_search_ads_source", "materialized": "table", "enabled": true}, "created_at": 1671505473.546509, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__organization_tmp\"\n),\n\nfields as (\n\n select\n \n \n \n currency\n \n as \n \n currency\n \n, \n \n \n id\n \n as \n \n id\n \n, \n \n \n name\n \n as \n \n name\n \n, \n \n \n payment_model\n \n as \n \n payment_model\n \n, \n \n \n time_zone\n \n as \n \n time_zone\n \n\n\n\n \n from base\n),\n\nfinal as (\n \n select \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": [], "relation_name": "\"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__organization\""}, "model.apple_search_ads_source.stg_apple_search_ads__keyword_report": {"compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.apple_search_ads_source.get_keyword_report_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.fill_pass_through_columns"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__keyword_report_tmp", "model.apple_search_ads_source.stg_apple_search_ads__keyword_report_tmp"]}, "config": {"enabled": true, "alias": null, "schema": "apple_search_ads_source", "database": null, "tags": [], "meta": {}, "materialized": "table", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "post-hook": [], "pre-hook": []}, "database": "postgres", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "fqn": ["apple_search_ads_source", "stg_apple_search_ads__keyword_report"], "unique_id": "model.apple_search_ads_source.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 from base\n),\n\nfinal as (\n \n select \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 new_downloads,\n redownloads,\n taps\n\n {{ fivetran_utils.fill_pass_through_columns('apple_search_ads__keyword_passthrough_metrics') }}\n from fields\n)\n\nselect * \nfrom final", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "stg_apple_search_ads__keyword_report.sql", "original_file_path": "models/stg_apple_search_ads__keyword_report.sql", "name": "stg_apple_search_ads__keyword_report", "alias": "stg_apple_search_ads__keyword_report", "checksum": {"name": "sha256", "checksum": "087cf73b201edc946f1b30c28096f4d513aca817fc3e510cac05f28dc781c665"}, "tags": [], "refs": [["stg_apple_search_ads__keyword_report_tmp"], ["stg_apple_search_ads__keyword_report_tmp"]], "sources": [], "metrics": [], "description": "Each record represents the daily performance of a keyword in Apple Search Ads.", "columns": {"keyword_id": {"name": "keyword_id", "description": "Keyword ID associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "date_day": {"name": "date_day", "description": "Date for daily report aggregation.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "impressions": {"name": "impressions", "description": "Number of times your ad appeared in App Store search results.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "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, "quote": null, "tags": []}, "currency": {"name": "currency", "description": "This currency value should match the respective organization's currency value.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "new_downloads": {"name": "new_downloads", "description": "App downloads from new users who have never before installed the respective app.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "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.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "taps": {"name": "taps", "description": "The number of times ad was tapped by users within the reporting time period.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": "apple_search_ads_source://models/stg_apple_search_ads.yml", "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads__keyword_report.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "apple_search_ads_source", "materialized": "table", "enabled": true}, "created_at": 1671505473.545569, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__keyword_report_tmp\"\n),\n\nfields as (\n\n select\n \n \n \n date\n \n as \n \n date\n \n, \n \n \n id\n \n as \n \n id\n \n, \n \n \n impressions\n \n as \n \n impressions\n \n, \n \n \n local_spend_amount\n \n as \n \n local_spend_amount\n \n, \n \n \n local_spend_currency\n \n as \n \n local_spend_currency\n \n, \n \n \n new_downloads\n \n as \n \n new_downloads\n \n, \n \n \n redownloads\n \n as \n \n redownloads\n \n, \n \n \n taps\n \n as \n \n taps\n \n\n\n \n from base\n),\n\nfinal as (\n \n select \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 new_downloads,\n redownloads,\n taps\n\n \n\n\n\n\n from fields\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "\"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__keyword_report\""}, "model.apple_search_ads_source.stg_apple_search_ads__keyword_history": {"compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.apple_search_ads_source.get_keyword_history_columns", "macro.fivetran_utils.fill_staging_columns"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__keyword_history_tmp", "model.apple_search_ads_source.stg_apple_search_ads__keyword_history_tmp"]}, "config": {"enabled": true, "alias": null, "schema": "apple_search_ads_source", "database": null, "tags": [], "meta": {}, "materialized": "table", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "post-hook": [], "pre-hook": []}, "database": "postgres", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "fqn": ["apple_search_ads_source", "stg_apple_search_ads__keyword_history"], "unique_id": "model.apple_search_ads_source.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 from base\n),\n\nfinal as (\n \n select \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", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "stg_apple_search_ads__keyword_history.sql", "original_file_path": "models/stg_apple_search_ads__keyword_history.sql", "name": "stg_apple_search_ads__keyword_history", "alias": "stg_apple_search_ads__keyword_history", "checksum": {"name": "sha256", "checksum": "5ee576e97a5fffaf97916376ca747fcb9389b6733d268f9b42308a8f244ade8e"}, "tags": [], "refs": [["stg_apple_search_ads__keyword_history_tmp"], ["stg_apple_search_ads__keyword_history_tmp"]], "sources": [], "metrics": [], "description": "Each record represents a version of a keyword in Apple Search Ads.", "columns": {"modified_at": {"name": "modified_at", "description": "Timestamp of when the keyword object was last modified.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "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, "quote": null, "tags": []}, "keyword_id": {"name": "keyword_id", "description": "Keyword ID associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_id": {"name": "campaign_id", "description": "Campaign ID associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "ad_group_id": {"name": "ad_group_id", "description": "Ad group ID associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "bid_amount": {"name": "bid_amount", "description": "The bid amount to display your ad for the matching text value.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "bid_currency": {"name": "bid_currency", "description": "This currency value should match the respective organization's currency value.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "match_type": {"name": "match_type", "description": "Controls how ads are matched to user searches; EXACT or BROAD.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "status": {"name": "status", "description": "The current status of the keyword, values include ENABLED and PAUSED.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "keyword_text": {"name": "keyword_text", "description": "The word or phrase to match in user searches, to show respective ad.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": "apple_search_ads_source://models/stg_apple_search_ads.yml", "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads__keyword_history.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "apple_search_ads_source", "materialized": "table", "enabled": true}, "created_at": 1671505473.544138, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__keyword_history_tmp\"\n),\n\nfields as (\n\n select\n \n \n \n ad_group_id\n \n as \n \n ad_group_id\n \n, \n \n \n bid_amount\n \n as \n \n bid_amount\n \n, \n \n \n bid_currency\n \n as \n \n bid_currency\n \n, \n \n \n campaign_id\n \n as \n \n campaign_id\n \n, \n \n \n id\n \n as \n \n id\n \n, \n \n \n match_type\n \n as \n \n match_type\n \n, \n \n \n modification_time\n \n as \n \n modification_time\n \n, \n \n \n status\n \n as \n \n status\n \n, \n \n \n text\n \n as \n \n text\n \n\n\n\n \n from base\n),\n\nfinal as (\n \n select \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": [], "relation_name": "\"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__keyword_history\""}, "model.apple_search_ads_source.stg_apple_search_ads__search_term_report": {"compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.apple_search_ads_source.get_search_term_report_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.fill_pass_through_columns"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__search_term_report_tmp", "model.apple_search_ads_source.stg_apple_search_ads__search_term_report_tmp"]}, "config": {"enabled": true, "alias": null, "schema": "apple_search_ads_source", "database": null, "tags": [], "meta": {}, "materialized": "table", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "post-hook": [], "pre-hook": []}, "database": "postgres", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "fqn": ["apple_search_ads_source", "stg_apple_search_ads__search_term_report"], "unique_id": "model.apple_search_ads_source.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 from base\n),\n\nfinal as (\n \n select \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 new_downloads,\n redownloads\n\n {{ fivetran_utils.fill_pass_through_columns('apple_search_ads__search_term_passthrough_metrics') }}\n from fields\n)\n\nselect * \nfrom final", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "stg_apple_search_ads__search_term_report.sql", "original_file_path": "models/stg_apple_search_ads__search_term_report.sql", "name": "stg_apple_search_ads__search_term_report", "alias": "stg_apple_search_ads__search_term_report", "checksum": {"name": "sha256", "checksum": "6345a092b669f3283eb8b09b8590cdcf4e89da7ac486c18bb626315fac6db0e0"}, "tags": [], "refs": [["stg_apple_search_ads__search_term_report_tmp"], ["stg_apple_search_ads__search_term_report_tmp"]], "sources": [], "metrics": [], "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, "quote": null, "tags": []}, "ad_group_id": {"name": "ad_group_id", "description": "Ad group ID associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "ad_format": {"name": "ad_format", "description": "Format of creative set.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_id": {"name": "campaign_id", "description": "Campaign ID associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "date_day": {"name": "date_day", "description": "Date for daily report aggregation.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "ad_group_name": {"name": "ad_group_name", "description": "Ad group name.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "bid_amount": {"name": "bid_amount", "description": "The bid amount to display your ad for the matching text value.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "bid_currency": {"name": "bid_currency", "description": "This currency value should match the respective organization's currency value.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "keyword_text": {"name": "keyword_text", "description": "The word or phrase to match in user searches, to show respective ad.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "keyword_display_status": {"name": "keyword_display_status", "description": "The keyword display status can either be ACTIVE or PAUSED.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "keyword_id": {"name": "keyword_id", "description": "Keyword ID associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "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, "quote": null, "tags": []}, "currency": {"name": "currency", "description": "This currency value should match the respective organization's currency value.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "match_type": {"name": "match_type", "description": "Controls how ads are matched to user searches; values include EXACT, BROAD or AUTO.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "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, "quote": null, "tags": []}, "search_term_text": {"name": "search_term_text", "description": "The word or phrase to match of user searches.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "impressions": {"name": "impressions", "description": "Number of times your ad appeared in App Store search results.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "taps": {"name": "taps", "description": "The number of times ad was tapped by users within the reporting time period.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "new_downloads": {"name": "new_downloads", "description": "App downloads from new users who have never before installed the respective app.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "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.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": "apple_search_ads_source://models/stg_apple_search_ads.yml", "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads__search_term_report.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "apple_search_ads_source", "materialized": "table", "enabled": true}, "created_at": 1671505473.549597, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__search_term_report_tmp\"\n),\n\nfields as (\n\n select\n \n \n \n _fivetran_id\n \n as \n \n _fivetran_id\n \n, \n \n \n ad_group_deleted\n \n as \n \n ad_group_deleted\n \n, \n \n \n ad_group_id\n \n as \n \n ad_group_id\n \n, \n \n \n ad_group_name\n \n as \n \n ad_group_name\n \n, \n \n \n bid_amount_amount\n \n as \n \n bid_amount_amount\n \n, \n \n \n bid_amount_currency\n \n as \n \n bid_amount_currency\n \n, \n \n \n campaign_id\n \n as \n \n campaign_id\n \n, \n \n \n date\n \n as \n \n date\n \n, \n \n \n deleted\n \n as \n \n deleted\n \n, \n \n \n impressions\n \n as \n \n impressions\n \n, \n \n \n keyword\n \n as \n \n keyword\n \n, \n \n \n keyword_display_status\n \n as \n \n keyword_display_status\n \n, \n \n \n keyword_id\n \n as \n \n keyword_id\n \n, \n \n \n local_spend_amount\n \n as \n \n local_spend_amount\n \n, \n \n \n local_spend_currency\n \n as \n \n local_spend_currency\n \n, \n \n \n match_type\n \n as \n \n match_type\n \n, \n \n \n new_downloads\n \n as \n \n new_downloads\n \n, \n \n \n redownloads\n \n as \n \n redownloads\n \n, \n \n \n search_term_source\n \n as \n \n search_term_source\n \n, \n \n \n search_term_text\n \n as \n \n search_term_text\n \n, \n \n \n taps\n \n as \n \n taps\n \n\n\n\n from base\n),\n\nfinal as (\n \n select \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 new_downloads,\n redownloads\n\n \n\n\n\n\n from fields\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "\"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__search_term_report\""}, "model.apple_search_ads_source.stg_apple_search_ads__ad_group_history": {"compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.apple_search_ads_source.get_ad_group_history_columns", "macro.fivetran_utils.fill_staging_columns"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__ad_group_history_tmp", "model.apple_search_ads_source.stg_apple_search_ads__ad_group_history_tmp"]}, "config": {"enabled": true, "alias": null, "schema": "apple_search_ads_source", "database": null, "tags": [], "meta": {}, "materialized": "table", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "post-hook": [], "pre-hook": []}, "database": "postgres", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "fqn": ["apple_search_ads_source", "stg_apple_search_ads__ad_group_history"], "unique_id": "model.apple_search_ads_source.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 from base\n),\n\nfinal as (\n select \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", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "stg_apple_search_ads__ad_group_history.sql", "original_file_path": "models/stg_apple_search_ads__ad_group_history.sql", "name": "stg_apple_search_ads__ad_group_history", "alias": "stg_apple_search_ads__ad_group_history", "checksum": {"name": "sha256", "checksum": "b2081179706957545ca7818fd65e298a3948051372426039e2ecffd091fef371"}, "tags": [], "refs": [["stg_apple_search_ads__ad_group_history_tmp"], ["stg_apple_search_ads__ad_group_history_tmp"]], "sources": [], "metrics": [], "description": "Each record represents a version of an ad group in Apple Search Ads.", "columns": {"modified_at": {"name": "modified_at", "description": "Timestamp of when the ad group object was last modified.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "is_most_recent_record": {"name": "is_most_recent_record", "description": "Boolean indicating whether record was the most recent instance.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "ad_group_id": {"name": "ad_group_id", "description": "Ad group ID associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_id": {"name": "campaign_id", "description": "Campaign ID associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "start_at": {"name": "start_at", "description": "The designated ad group start time.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "end_at": {"name": "end_at", "description": "The designated ad group end time.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "ad_group_name": {"name": "ad_group_name", "description": "Ad group name.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "organization_id": {"name": "organization_id", "description": "Organization ID associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "status": {"name": "status", "description": "The current status of the ad group, values include ENABLED and PAUSED.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": "apple_search_ads_source://models/stg_apple_search_ads.yml", "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads__ad_group_history.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "apple_search_ads_source", "materialized": "table", "enabled": true}, "created_at": 1671505473.5350132, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__ad_group_history_tmp\"\n),\n\nfields as (\n\n select\n \n \n \n campaign_id\n \n as \n \n campaign_id\n \n, \n \n \n end_time\n \n as \n \n end_time\n \n, \n \n \n id\n \n as \n \n id\n \n, \n \n \n modification_time\n \n as \n \n modification_time\n \n, \n \n \n name\n \n as \n \n name\n \n, \n \n \n organization_id\n \n as \n \n organization_id\n \n, \n \n \n start_time\n \n as \n \n start_time\n \n, \n \n \n status\n \n as \n \n status\n \n\n\n\n \n from base\n),\n\nfinal as (\n select \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": [], "relation_name": "\"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__ad_group_history\""}, "model.apple_search_ads_source.stg_apple_search_ads__ad_history": {"compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.apple_search_ads_source.get_ad_history_columns", "macro.fivetran_utils.fill_staging_columns"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__ad_history_tmp", "model.apple_search_ads_source.stg_apple_search_ads__ad_history_tmp"]}, "config": {"enabled": true, "alias": null, "schema": "apple_search_ads_source", "database": null, "tags": [], "meta": {}, "materialized": "table", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "post-hook": [], "pre-hook": []}, "database": "postgres", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "fqn": ["apple_search_ads_source", "stg_apple_search_ads__ad_history"], "unique_id": "model.apple_search_ads_source.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 from base\n),\n\nfinal as (\n \n select \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", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "stg_apple_search_ads__ad_history.sql", "original_file_path": "models/stg_apple_search_ads__ad_history.sql", "name": "stg_apple_search_ads__ad_history", "alias": "stg_apple_search_ads__ad_history", "checksum": {"name": "sha256", "checksum": "4abb76f80d87af32ba976747bb0accf3b1641854a41a3e9d8ebec94533405d23"}, "tags": [], "refs": [["stg_apple_search_ads__ad_history_tmp"], ["stg_apple_search_ads__ad_history_tmp"]], "sources": [], "metrics": [], "description": "Each record represents a version of an ad in Apple Search Ads.", "columns": {"created_at": {"name": "created_at", "description": "Timestamp of when ad was created.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "modified_at": {"name": "modified_at", "description": "Timestamp of when the ad object was last modified.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "organization_id": {"name": "organization_id", "description": "Organization ID associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_id": {"name": "campaign_id", "description": "Campaign ID associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "ad_group_id": {"name": "ad_group_id", "description": "Ad group ID associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "ad_name": {"name": "ad_name", "description": "Ad name associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "ad_id": {"name": "ad_id", "description": "Ad ID associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "ad_status": {"name": "ad_status", "description": "The current status of the ad, values include ENABLED and PAUSED.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": "apple_search_ads_source://models/stg_apple_search_ads.yml", "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads__ad_history.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "apple_search_ads_source", "materialized": "table", "enabled": true}, "created_at": 1671505473.5378802, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__ad_history_tmp\"\n),\n\nfields as (\n\n select\n \n \n \n ad_group_id\n \n as \n \n ad_group_id\n \n, \n \n \n campaign_id\n \n as \n \n campaign_id\n \n, \n \n \n creation_time\n \n as \n \n creation_time\n \n, \n \n \n id\n \n as \n \n id\n \n, \n \n \n modification_time\n \n as \n \n modification_time\n \n, \n \n \n name\n \n as \n \n name\n \n, \n \n \n org_id\n \n as \n \n org_id\n \n, \n \n \n status\n \n as \n \n status\n \n\n\n\n from base\n),\n\nfinal as (\n \n select \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": [], "relation_name": "\"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__ad_history\""}, "model.apple_search_ads_source.stg_apple_search_ads__ad_group_report": {"compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.apple_search_ads_source.get_ad_group_report_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.fill_pass_through_columns"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__ad_group_report_tmp", "model.apple_search_ads_source.stg_apple_search_ads__ad_group_report_tmp"]}, "config": {"enabled": true, "alias": null, "schema": "apple_search_ads_source", "database": null, "tags": [], "meta": {}, "materialized": "table", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "post-hook": [], "pre-hook": []}, "database": "postgres", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "fqn": ["apple_search_ads_source", "stg_apple_search_ads__ad_group_report"], "unique_id": "model.apple_search_ads_source.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 from base\n),\n\nfinal as (\n \n select\n date as date_day, \n ad_group_id,\n impressions,\n local_spend_amount as spend,\n local_spend_currency as currency,\n new_downloads,\n redownloads,\n taps\n\n {{ fivetran_utils.fill_pass_through_columns('apple_search_ads__ad_group_passthrough_metrics') }}\n from fields\n)\n\nselect * \nfrom final", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "stg_apple_search_ads__ad_group_report.sql", "original_file_path": "models/stg_apple_search_ads__ad_group_report.sql", "name": "stg_apple_search_ads__ad_group_report", "alias": "stg_apple_search_ads__ad_group_report", "checksum": {"name": "sha256", "checksum": "a6f8f1e79e88e2512acd90e2768436ef73939e82acd46b79c0775ba19865147d"}, "tags": [], "refs": [["stg_apple_search_ads__ad_group_report_tmp"], ["stg_apple_search_ads__ad_group_report_tmp"]], "sources": [], "metrics": [], "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, "quote": null, "tags": []}, "date_day": {"name": "date_day", "description": "Date for daily report aggregation.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "impressions": {"name": "impressions", "description": "Number of times your ad appeared in App Store search results.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "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, "quote": null, "tags": []}, "currency": {"name": "currency", "description": "This currency value should match the respective organization's currency value.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "new_downloads": {"name": "new_downloads", "description": "App downloads from new users who have never before installed the respective app.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "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.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "taps": {"name": "taps", "description": "The number of times ad was tapped by users within the reporting time period.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": "apple_search_ads_source://models/stg_apple_search_ads.yml", "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads__ad_group_report.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "apple_search_ads_source", "materialized": "table", "enabled": true}, "created_at": 1671505473.536444, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__ad_group_report_tmp\"\n),\n\nfields as (\n\n select\n \n \n \n ad_group_id\n \n as \n \n ad_group_id\n \n, \n \n \n date\n \n as \n \n date\n \n, \n \n \n impressions\n \n as \n \n impressions\n \n, \n \n \n local_spend_amount\n \n as \n \n local_spend_amount\n \n, \n \n \n local_spend_currency\n \n as \n \n local_spend_currency\n \n, \n \n \n new_downloads\n \n as \n \n new_downloads\n \n, \n \n \n redownloads\n \n as \n \n redownloads\n \n, \n \n \n taps\n \n as \n \n taps\n \n\n\n\n from base\n),\n\nfinal as (\n \n select\n date as date_day, \n ad_group_id,\n impressions,\n local_spend_amount as spend,\n local_spend_currency as currency,\n new_downloads,\n redownloads,\n taps\n\n \n\n\n\n\n from fields\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "\"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__ad_group_report\""}, "model.apple_search_ads_source.stg_apple_search_ads__search_term_report_tmp": {"compiled": true, "resource_type": "model", "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars"], "nodes": ["source.apple_search_ads_source.apple_search_ads.search_term_report"]}, "config": {"enabled": true, "alias": null, "schema": "apple_search_ads_source", "database": null, "tags": [], "meta": {}, "materialized": "view", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "post-hook": [], "pre-hook": []}, "database": "postgres", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "fqn": ["apple_search_ads_source", "tmp", "stg_apple_search_ads__search_term_report_tmp"], "unique_id": "model.apple_search_ads_source.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\nselect * \nfrom {{ var('search_term_report') }}", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "tmp/stg_apple_search_ads__search_term_report_tmp.sql", "original_file_path": "models/tmp/stg_apple_search_ads__search_term_report_tmp.sql", "name": "stg_apple_search_ads__search_term_report_tmp", "alias": "stg_apple_search_ads__search_term_report_tmp", "checksum": {"name": "sha256", "checksum": "86f6e99ff5c0373cf5ec106d4011966278601cb5350d588466564e2dca2fa951"}, "tags": [], "refs": [], "sources": [["apple_search_ads", "search_term_report"]], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/tmp/stg_apple_search_ads__search_term_report_tmp.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "apple_search_ads_source", "materialized": "view", "enabled": true}, "created_at": 1671505473.406634, "compiled_code": "\n\nselect * \nfrom \"postgres\".\"apple_search_ads_integration_tests\".\"search_term_report_data\"", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "\"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__search_term_report_tmp\""}, "model.apple_search_ads_source.stg_apple_search_ads__campaign_history_tmp": {"compiled": true, "resource_type": "model", "depends_on": {"macros": [], "nodes": ["source.apple_search_ads_source.apple_search_ads.campaign_history"]}, "config": {"enabled": true, "alias": null, "schema": "apple_search_ads_source", "database": null, "tags": [], "meta": {}, "materialized": "view", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "post-hook": [], "pre-hook": []}, "database": "postgres", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "fqn": ["apple_search_ads_source", "tmp", "stg_apple_search_ads__campaign_history_tmp"], "unique_id": "model.apple_search_ads_source.stg_apple_search_ads__campaign_history_tmp", "raw_code": "{{ config(enabled=var('ad_reporting__apple_search_ads_enabled', True)) }}\n\nselect * \nfrom {{ var('campaign_history') }}", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "tmp/stg_apple_search_ads__campaign_history_tmp.sql", "original_file_path": "models/tmp/stg_apple_search_ads__campaign_history_tmp.sql", "name": "stg_apple_search_ads__campaign_history_tmp", "alias": "stg_apple_search_ads__campaign_history_tmp", "checksum": {"name": "sha256", "checksum": "e23c062d3d75b890a717ab4047e5a0dccf7c098b3927935df02f76c17acb3ea7"}, "tags": [], "refs": [], "sources": [["apple_search_ads", "campaign_history"]], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/tmp/stg_apple_search_ads__campaign_history_tmp.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "apple_search_ads_source", "materialized": "view", "enabled": true}, "created_at": 1671505473.41035, "compiled_code": "\n\nselect * \nfrom \"postgres\".\"apple_search_ads_integration_tests\".\"campaign_history_data\"", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "\"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__campaign_history_tmp\""}, "model.apple_search_ads_source.stg_apple_search_ads__keyword_history_tmp": {"compiled": true, "resource_type": "model", "depends_on": {"macros": [], "nodes": ["source.apple_search_ads_source.apple_search_ads.keyword_history"]}, "config": {"enabled": true, "alias": null, "schema": "apple_search_ads_source", "database": null, "tags": [], "meta": {}, "materialized": "view", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "post-hook": [], "pre-hook": []}, "database": "postgres", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "fqn": ["apple_search_ads_source", "tmp", "stg_apple_search_ads__keyword_history_tmp"], "unique_id": "model.apple_search_ads_source.stg_apple_search_ads__keyword_history_tmp", "raw_code": "{{ config(enabled=var('ad_reporting__apple_search_ads_enabled', True)) }}\n\nselect * \nfrom {{ var('keyword_history') }}", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "tmp/stg_apple_search_ads__keyword_history_tmp.sql", "original_file_path": "models/tmp/stg_apple_search_ads__keyword_history_tmp.sql", "name": "stg_apple_search_ads__keyword_history_tmp", "alias": "stg_apple_search_ads__keyword_history_tmp", "checksum": {"name": "sha256", "checksum": "852fa9ece91c72dd36f654ce0d71f2af4a1707385c0fa00e3d68e206e4ac456b"}, "tags": [], "refs": [], "sources": [["apple_search_ads", "keyword_history"]], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/tmp/stg_apple_search_ads__keyword_history_tmp.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "apple_search_ads_source", "materialized": "view", "enabled": true}, "created_at": 1671505473.4146812, "compiled_code": "\n\nselect * \nfrom \"postgres\".\"apple_search_ads_integration_tests\".\"keyword_history_data\"", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "\"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__keyword_history_tmp\""}, "model.apple_search_ads_source.stg_apple_search_ads__ad_group_history_tmp": {"compiled": true, "resource_type": "model", "depends_on": {"macros": [], "nodes": ["source.apple_search_ads_source.apple_search_ads.ad_group_history"]}, "config": {"enabled": true, "alias": null, "schema": "apple_search_ads_source", "database": null, "tags": [], "meta": {}, "materialized": "view", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "post-hook": [], "pre-hook": []}, "database": "postgres", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "fqn": ["apple_search_ads_source", "tmp", "stg_apple_search_ads__ad_group_history_tmp"], "unique_id": "model.apple_search_ads_source.stg_apple_search_ads__ad_group_history_tmp", "raw_code": "{{ config(enabled=var('ad_reporting__apple_search_ads_enabled', True)) }}\n\nselect * \nfrom {{ var('ad_group_history') }}", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "tmp/stg_apple_search_ads__ad_group_history_tmp.sql", "original_file_path": "models/tmp/stg_apple_search_ads__ad_group_history_tmp.sql", "name": "stg_apple_search_ads__ad_group_history_tmp", "alias": "stg_apple_search_ads__ad_group_history_tmp", "checksum": {"name": "sha256", "checksum": "69317b26b7a3c109c0e5e61d7fdad053cb0549479a0dfdacd0d67ff0757cc97e"}, "tags": [], "refs": [], "sources": [["apple_search_ads", "ad_group_history"]], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/tmp/stg_apple_search_ads__ad_group_history_tmp.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "apple_search_ads_source", "materialized": "view", "enabled": true}, "created_at": 1671505473.418135, "compiled_code": "\n\nselect * \nfrom \"postgres\".\"apple_search_ads_integration_tests\".\"ad_group_history_data\"", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "\"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__ad_group_history_tmp\""}, "model.apple_search_ads_source.stg_apple_search_ads__ad_group_report_tmp": {"compiled": true, "resource_type": "model", "depends_on": {"macros": [], "nodes": ["source.apple_search_ads_source.apple_search_ads.ad_group_report"]}, "config": {"enabled": true, "alias": null, "schema": "apple_search_ads_source", "database": null, "tags": [], "meta": {}, "materialized": "view", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "post-hook": [], "pre-hook": []}, "database": "postgres", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "fqn": ["apple_search_ads_source", "tmp", "stg_apple_search_ads__ad_group_report_tmp"], "unique_id": "model.apple_search_ads_source.stg_apple_search_ads__ad_group_report_tmp", "raw_code": "{{ config(enabled=var('ad_reporting__apple_search_ads_enabled', True)) }}\n\nselect * \nfrom {{ var('ad_group_report') }}", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "tmp/stg_apple_search_ads__ad_group_report_tmp.sql", "original_file_path": "models/tmp/stg_apple_search_ads__ad_group_report_tmp.sql", "name": "stg_apple_search_ads__ad_group_report_tmp", "alias": "stg_apple_search_ads__ad_group_report_tmp", "checksum": {"name": "sha256", "checksum": "91089253c95dee7d0aea3f9b8cc49cf343c2d06acf0de36641ebaef03e1d2b1b"}, "tags": [], "refs": [], "sources": [["apple_search_ads", "ad_group_report"]], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/tmp/stg_apple_search_ads__ad_group_report_tmp.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "apple_search_ads_source", "materialized": "view", "enabled": true}, "created_at": 1671505473.4215622, "compiled_code": "\n\nselect * \nfrom \"postgres\".\"apple_search_ads_integration_tests\".\"ad_group_report_data\"", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "\"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__ad_group_report_tmp\""}, "model.apple_search_ads_source.stg_apple_search_ads__ad_history_tmp": {"compiled": true, "resource_type": "model", "depends_on": {"macros": [], "nodes": ["source.apple_search_ads_source.apple_search_ads.ad_history"]}, "config": {"enabled": true, "alias": null, "schema": "apple_search_ads_source", "database": null, "tags": [], "meta": {}, "materialized": "view", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "post-hook": [], "pre-hook": []}, "database": "postgres", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "fqn": ["apple_search_ads_source", "tmp", "stg_apple_search_ads__ad_history_tmp"], "unique_id": "model.apple_search_ads_source.stg_apple_search_ads__ad_history_tmp", "raw_code": "{{ config(enabled=var('ad_reporting__apple_search_ads_enabled', True)) }}\n\nselect * \nfrom {{ var('ad_history') }}", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "tmp/stg_apple_search_ads__ad_history_tmp.sql", "original_file_path": "models/tmp/stg_apple_search_ads__ad_history_tmp.sql", "name": "stg_apple_search_ads__ad_history_tmp", "alias": "stg_apple_search_ads__ad_history_tmp", "checksum": {"name": "sha256", "checksum": "7b184af2299b7d42defa4606467cf9bf379e10cec768bf1e5825c040dbdfacb8"}, "tags": [], "refs": [], "sources": [["apple_search_ads", "ad_history"]], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/tmp/stg_apple_search_ads__ad_history_tmp.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "apple_search_ads_source", "materialized": "view", "enabled": true}, "created_at": 1671505473.4259908, "compiled_code": "\n\nselect * \nfrom \"postgres\".\"apple_search_ads_integration_tests\".\"ad_history_data\"", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "\"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__ad_history_tmp\""}, "model.apple_search_ads_source.stg_apple_search_ads__campaign_report_tmp": {"compiled": true, "resource_type": "model", "depends_on": {"macros": [], "nodes": ["source.apple_search_ads_source.apple_search_ads.campaign_report"]}, "config": {"enabled": true, "alias": null, "schema": "apple_search_ads_source", "database": null, "tags": [], "meta": {}, "materialized": "view", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "post-hook": [], "pre-hook": []}, "database": "postgres", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "fqn": ["apple_search_ads_source", "tmp", "stg_apple_search_ads__campaign_report_tmp"], "unique_id": "model.apple_search_ads_source.stg_apple_search_ads__campaign_report_tmp", "raw_code": "{{ config(enabled=var('ad_reporting__apple_search_ads_enabled', True)) }}\n\nselect * \nfrom {{ var('campaign_report') }}", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "tmp/stg_apple_search_ads__campaign_report_tmp.sql", "original_file_path": "models/tmp/stg_apple_search_ads__campaign_report_tmp.sql", "name": "stg_apple_search_ads__campaign_report_tmp", "alias": "stg_apple_search_ads__campaign_report_tmp", "checksum": {"name": "sha256", "checksum": "ae8d95be0097305356d0ba251d324d35bbe367edcf342c958f69fea9f89625f2"}, "tags": [], "refs": [], "sources": [["apple_search_ads", "campaign_report"]], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/tmp/stg_apple_search_ads__campaign_report_tmp.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "apple_search_ads_source", "materialized": "view", "enabled": true}, "created_at": 1671505473.430115, "compiled_code": "\n\nselect * \nfrom \"postgres\".\"apple_search_ads_integration_tests\".\"campaign_report_data\"", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "\"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__campaign_report_tmp\""}, "model.apple_search_ads_source.stg_apple_search_ads__organization_tmp": {"compiled": true, "resource_type": "model", "depends_on": {"macros": [], "nodes": ["source.apple_search_ads_source.apple_search_ads.organization"]}, "config": {"enabled": true, "alias": null, "schema": "apple_search_ads_source", "database": null, "tags": [], "meta": {}, "materialized": "view", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "post-hook": [], "pre-hook": []}, "database": "postgres", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "fqn": ["apple_search_ads_source", "tmp", "stg_apple_search_ads__organization_tmp"], "unique_id": "model.apple_search_ads_source.stg_apple_search_ads__organization_tmp", "raw_code": "{{ config(enabled=var('ad_reporting__apple_search_ads_enabled', True)) }}\n\nselect * \nfrom {{ var('organization') }}", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "tmp/stg_apple_search_ads__organization_tmp.sql", "original_file_path": "models/tmp/stg_apple_search_ads__organization_tmp.sql", "name": "stg_apple_search_ads__organization_tmp", "alias": "stg_apple_search_ads__organization_tmp", "checksum": {"name": "sha256", "checksum": "4a62af784e819ec6034aa89fe16019f027c9994b192426e70bcf18bda3d117a9"}, "tags": [], "refs": [], "sources": [["apple_search_ads", "organization"]], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/tmp/stg_apple_search_ads__organization_tmp.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "apple_search_ads_source", "materialized": "view", "enabled": true}, "created_at": 1671505473.435835, "compiled_code": "\n\nselect * \nfrom \"postgres\".\"apple_search_ads_integration_tests\".\"organization_data\"", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "\"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__organization_tmp\""}, "model.apple_search_ads_source.stg_apple_search_ads__keyword_report_tmp": {"compiled": true, "resource_type": "model", "depends_on": {"macros": [], "nodes": ["source.apple_search_ads_source.apple_search_ads.keyword_report"]}, "config": {"enabled": true, "alias": null, "schema": "apple_search_ads_source", "database": null, "tags": [], "meta": {}, "materialized": "view", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "post-hook": [], "pre-hook": []}, "database": "postgres", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "fqn": ["apple_search_ads_source", "tmp", "stg_apple_search_ads__keyword_report_tmp"], "unique_id": "model.apple_search_ads_source.stg_apple_search_ads__keyword_report_tmp", "raw_code": "{{ config(enabled=var('ad_reporting__apple_search_ads_enabled', True)) }}\n\nselect * \nfrom {{ var('keyword_report') }}", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "tmp/stg_apple_search_ads__keyword_report_tmp.sql", "original_file_path": "models/tmp/stg_apple_search_ads__keyword_report_tmp.sql", "name": "stg_apple_search_ads__keyword_report_tmp", "alias": "stg_apple_search_ads__keyword_report_tmp", "checksum": {"name": "sha256", "checksum": "5009b770850f4f2648d5498a78b1491e6a44250d9ac2d7c08c249e8624f517f2"}, "tags": [], "refs": [], "sources": [["apple_search_ads", "keyword_report"]], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/tmp/stg_apple_search_ads__keyword_report_tmp.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "apple_search_ads_source", "materialized": "view", "enabled": true}, "created_at": 1671505473.439306, "compiled_code": "\n\nselect * \nfrom \"postgres\".\"apple_search_ads_integration_tests\".\"keyword_report_data\"", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "\"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__keyword_report_tmp\""}, "model.apple_search_ads_source.stg_apple_search_ads__ad_report_tmp": {"compiled": true, "resource_type": "model", "depends_on": {"macros": [], "nodes": ["source.apple_search_ads_source.apple_search_ads.ad_level_report"]}, "config": {"enabled": true, "alias": null, "schema": "apple_search_ads_source", "database": null, "tags": [], "meta": {}, "materialized": "view", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "post-hook": [], "pre-hook": []}, "database": "postgres", "schema": "apple_search_ads_integration_tests_apple_search_ads_source", "fqn": ["apple_search_ads_source", "tmp", "stg_apple_search_ads__ad_report_tmp"], "unique_id": "model.apple_search_ads_source.stg_apple_search_ads__ad_report_tmp", "raw_code": "{{ config(enabled=var('ad_reporting__apple_search_ads_enabled', True)) }}\n\nselect * \nfrom {{ var('ad_report') }}", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "tmp/stg_apple_search_ads__ad_report_tmp.sql", "original_file_path": "models/tmp/stg_apple_search_ads__ad_report_tmp.sql", "name": "stg_apple_search_ads__ad_report_tmp", "alias": "stg_apple_search_ads__ad_report_tmp", "checksum": {"name": "sha256", "checksum": "1744a47e20045a53726079456f5aba358e0292dd8a14d670e6ab7b2c30ece7ee"}, "tags": [], "refs": [], "sources": [["apple_search_ads", "ad_level_report"]], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/tmp/stg_apple_search_ads__ad_report_tmp.sql", "build_path": null, "deferred": false, "unrendered_config": {"schema": "apple_search_ads_source", "materialized": "view", "enabled": true}, "created_at": 1671505473.442803, "compiled_code": "\n\nselect * \nfrom \"postgres\".\"apple_search_ads_integration_tests\".\"ad_report_data\"", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "\"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__ad_report_tmp\""}, "test.apple_search_ads.not_null_apple_search_ads__ad_group_report_ad_group_id.60febec6b5": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "ad_group_id", "model": "{{ get_where_subquery(ref('apple_search_ads__ad_group_report')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads.apple_search_ads__ad_group_report"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "postgres", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads", "not_null_apple_search_ads__ad_group_report_ad_group_id"], "unique_id": "test.apple_search_ads.not_null_apple_search_ads__ad_group_report_ad_group_id.60febec6b5", "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "package_name": "apple_search_ads", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads", "path": "not_null_apple_search_ads__ad_group_report_ad_group_id.sql", "original_file_path": "models/apple_search_ads.yml", "name": "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": ""}, "tags": [], "refs": [["apple_search_ads__ad_group_report"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads/models/apple_search_ads.yml/not_null_apple_search_ads__ad_group_report_ad_group_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1671505473.472697, "compiled_code": "\n \n \n\n\n\nselect ad_group_id\nfrom \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads\".\"apple_search_ads__ad_group_report\"\nwhere ad_group_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "ad_group_id", "file_key_name": "models.apple_search_ads__ad_group_report"}, "test.apple_search_ads.not_null_apple_search_ads__ad_group_report_date_day.e6ffb30b3c": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('apple_search_ads__ad_group_report')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads.apple_search_ads__ad_group_report"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "postgres", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads", "not_null_apple_search_ads__ad_group_report_date_day"], "unique_id": "test.apple_search_ads.not_null_apple_search_ads__ad_group_report_date_day.e6ffb30b3c", "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "package_name": "apple_search_ads", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads", "path": "not_null_apple_search_ads__ad_group_report_date_day.sql", "original_file_path": "models/apple_search_ads.yml", "name": "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": ""}, "tags": [], "refs": [["apple_search_ads__ad_group_report"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads/models/apple_search_ads.yml/not_null_apple_search_ads__ad_group_report_date_day.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1671505473.473963, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads\".\"apple_search_ads__ad_group_report\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "date_day", "file_key_name": "models.apple_search_ads__ad_group_report"}, "test.apple_search_ads.dbt_utils_unique_combination_of_columns_apple_search_ads__ad_group_report_organization_id__campaign_id__ad_group_id__date_day.19d180bab9": {"test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["organization_id", "campaign_id", "ad_group_id", "date_day"], "model": "{{ get_where_subquery(ref('apple_search_ads__ad_group_report')) }}"}, "namespace": "dbt_utils"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_utils.test_unique_combination_of_columns", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads.apple_search_ads__ad_group_report"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_36b2ef766b4fc10b364ed4744c94afb2", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "postgres", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads", "dbt_utils_unique_combination_of_columns_apple_search_ads__ad_group_report_organization_id__campaign_id__ad_group_id__date_day"], "unique_id": "test.apple_search_ads.dbt_utils_unique_combination_of_columns_apple_search_ads__ad_group_report_organization_id__campaign_id__ad_group_id__date_day.19d180bab9", "raw_code": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_36b2ef766b4fc10b364ed4744c94afb2\") }}", "language": "sql", "package_name": "apple_search_ads", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads", "path": "dbt_utils_unique_combination_o_36b2ef766b4fc10b364ed4744c94afb2.sql", "original_file_path": "models/apple_search_ads.yml", "name": "dbt_utils_unique_combination_of_columns_apple_search_ads__ad_group_report_organization_id__campaign_id__ad_group_id__date_day", "alias": "dbt_utils_unique_combination_o_36b2ef766b4fc10b364ed4744c94afb2", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["apple_search_ads__ad_group_report"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads/models/apple_search_ads.yml/dbt_utils_unique_combination_o_36b2ef766b4fc10b364ed4744c94afb2.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_36b2ef766b4fc10b364ed4744c94afb2"}, "created_at": 1671505473.475101, "compiled_code": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n organization_id, campaign_id, ad_group_id, date_day\n from \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads\".\"apple_search_ads__ad_group_report\"\n group by organization_id, campaign_id, ad_group_id, date_day\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": null, "file_key_name": "models.apple_search_ads__ad_group_report"}, "test.apple_search_ads.not_null_apple_search_ads__ad_report_ad_id.0ab2c5075c": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "ad_id", "model": "{{ get_where_subquery(ref('apple_search_ads__ad_report')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads.apple_search_ads__ad_report"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "postgres", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads", "not_null_apple_search_ads__ad_report_ad_id"], "unique_id": "test.apple_search_ads.not_null_apple_search_ads__ad_report_ad_id.0ab2c5075c", "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "package_name": "apple_search_ads", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads", "path": "not_null_apple_search_ads__ad_report_ad_id.sql", "original_file_path": "models/apple_search_ads.yml", "name": "not_null_apple_search_ads__ad_report_ad_id", "alias": "not_null_apple_search_ads__ad_report_ad_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["apple_search_ads__ad_report"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads/models/apple_search_ads.yml/not_null_apple_search_ads__ad_report_ad_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1671505473.4826071, "compiled_code": "\n \n \n\n\n\nselect ad_id\nfrom \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads\".\"apple_search_ads__ad_report\"\nwhere ad_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "ad_id", "file_key_name": "models.apple_search_ads__ad_report"}, "test.apple_search_ads.not_null_apple_search_ads__ad_report_date_day.b86c049e17": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('apple_search_ads__ad_report')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads.apple_search_ads__ad_report"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "postgres", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads", "not_null_apple_search_ads__ad_report_date_day"], "unique_id": "test.apple_search_ads.not_null_apple_search_ads__ad_report_date_day.b86c049e17", "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "package_name": "apple_search_ads", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads", "path": "not_null_apple_search_ads__ad_report_date_day.sql", "original_file_path": "models/apple_search_ads.yml", "name": "not_null_apple_search_ads__ad_report_date_day", "alias": "not_null_apple_search_ads__ad_report_date_day", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["apple_search_ads__ad_report"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads/models/apple_search_ads.yml/not_null_apple_search_ads__ad_report_date_day.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1671505473.4836109, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads\".\"apple_search_ads__ad_report\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "date_day", "file_key_name": "models.apple_search_ads__ad_report"}, "test.apple_search_ads.dbt_utils_unique_combination_of_columns_apple_search_ads__ad_report_organization_id__campaign_id__ad_group_id__ad_id__date_day.54e27817a1": {"test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["organization_id", "campaign_id", "ad_group_id", "ad_id", "date_day"], "model": "{{ get_where_subquery(ref('apple_search_ads__ad_report')) }}"}, "namespace": "dbt_utils"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_utils.test_unique_combination_of_columns", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads.apple_search_ads__ad_report"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_bd72aacf9db10be434541a5eb54a963c", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "postgres", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads", "dbt_utils_unique_combination_of_columns_apple_search_ads__ad_report_organization_id__campaign_id__ad_group_id__ad_id__date_day"], "unique_id": "test.apple_search_ads.dbt_utils_unique_combination_of_columns_apple_search_ads__ad_report_organization_id__campaign_id__ad_group_id__ad_id__date_day.54e27817a1", "raw_code": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_bd72aacf9db10be434541a5eb54a963c\") }}", "language": "sql", "package_name": "apple_search_ads", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads", "path": "dbt_utils_unique_combination_o_bd72aacf9db10be434541a5eb54a963c.sql", "original_file_path": "models/apple_search_ads.yml", "name": "dbt_utils_unique_combination_of_columns_apple_search_ads__ad_report_organization_id__campaign_id__ad_group_id__ad_id__date_day", "alias": "dbt_utils_unique_combination_o_bd72aacf9db10be434541a5eb54a963c", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["apple_search_ads__ad_report"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads/models/apple_search_ads.yml/dbt_utils_unique_combination_o_bd72aacf9db10be434541a5eb54a963c.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_bd72aacf9db10be434541a5eb54a963c"}, "created_at": 1671505473.4847639, "compiled_code": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n organization_id, campaign_id, ad_group_id, ad_id, date_day\n from \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads\".\"apple_search_ads__ad_report\"\n group by organization_id, campaign_id, ad_group_id, ad_id, date_day\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": null, "file_key_name": "models.apple_search_ads__ad_report"}, "test.apple_search_ads.not_null_apple_search_ads__campaign_report_campaign_id.e26ed1e146": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "campaign_id", "model": "{{ get_where_subquery(ref('apple_search_ads__campaign_report')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads.apple_search_ads__campaign_report"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "postgres", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads", "not_null_apple_search_ads__campaign_report_campaign_id"], "unique_id": "test.apple_search_ads.not_null_apple_search_ads__campaign_report_campaign_id.e26ed1e146", "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "package_name": "apple_search_ads", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads", "path": "not_null_apple_search_ads__campaign_report_campaign_id.sql", "original_file_path": "models/apple_search_ads.yml", "name": "not_null_apple_search_ads__campaign_report_campaign_id", "alias": "not_null_apple_search_ads__campaign_report_campaign_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["apple_search_ads__campaign_report"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads/models/apple_search_ads.yml/not_null_apple_search_ads__campaign_report_campaign_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1671505473.48793, "compiled_code": "\n \n \n\n\n\nselect campaign_id\nfrom \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads\".\"apple_search_ads__campaign_report\"\nwhere campaign_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "campaign_id", "file_key_name": "models.apple_search_ads__campaign_report"}, "test.apple_search_ads.not_null_apple_search_ads__campaign_report_date_day.35652b8d1a": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('apple_search_ads__campaign_report')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads.apple_search_ads__campaign_report"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "postgres", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads", "not_null_apple_search_ads__campaign_report_date_day"], "unique_id": "test.apple_search_ads.not_null_apple_search_ads__campaign_report_date_day.35652b8d1a", "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "package_name": "apple_search_ads", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads", "path": "not_null_apple_search_ads__campaign_report_date_day.sql", "original_file_path": "models/apple_search_ads.yml", "name": "not_null_apple_search_ads__campaign_report_date_day", "alias": "not_null_apple_search_ads__campaign_report_date_day", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["apple_search_ads__campaign_report"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads/models/apple_search_ads.yml/not_null_apple_search_ads__campaign_report_date_day.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1671505473.4889338, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads\".\"apple_search_ads__campaign_report\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "date_day", "file_key_name": "models.apple_search_ads__campaign_report"}, "test.apple_search_ads.dbt_utils_unique_combination_of_columns_apple_search_ads__campaign_report_organization_id__campaign_id__date_day.647e56213f": {"test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["organization_id", "campaign_id", "date_day"], "model": "{{ get_where_subquery(ref('apple_search_ads__campaign_report')) }}"}, "namespace": "dbt_utils"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_utils.test_unique_combination_of_columns", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads.apple_search_ads__campaign_report"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_3acbf89c4e0b6809bc53bfa9067d89c5", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "postgres", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads", "dbt_utils_unique_combination_of_columns_apple_search_ads__campaign_report_organization_id__campaign_id__date_day"], "unique_id": "test.apple_search_ads.dbt_utils_unique_combination_of_columns_apple_search_ads__campaign_report_organization_id__campaign_id__date_day.647e56213f", "raw_code": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_3acbf89c4e0b6809bc53bfa9067d89c5\") }}", "language": "sql", "package_name": "apple_search_ads", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads", "path": "dbt_utils_unique_combination_o_3acbf89c4e0b6809bc53bfa9067d89c5.sql", "original_file_path": "models/apple_search_ads.yml", "name": "dbt_utils_unique_combination_of_columns_apple_search_ads__campaign_report_organization_id__campaign_id__date_day", "alias": "dbt_utils_unique_combination_o_3acbf89c4e0b6809bc53bfa9067d89c5", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["apple_search_ads__campaign_report"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads/models/apple_search_ads.yml/dbt_utils_unique_combination_o_3acbf89c4e0b6809bc53bfa9067d89c5.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_3acbf89c4e0b6809bc53bfa9067d89c5"}, "created_at": 1671505473.489928, "compiled_code": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n organization_id, campaign_id, date_day\n from \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads\".\"apple_search_ads__campaign_report\"\n group by organization_id, campaign_id, date_day\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": null, "file_key_name": "models.apple_search_ads__campaign_report"}, "test.apple_search_ads.not_null_apple_search_ads__keyword_report_keyword_id.ea493710db": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "keyword_id", "model": "{{ get_where_subquery(ref('apple_search_ads__keyword_report')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads.apple_search_ads__keyword_report"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "postgres", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads", "not_null_apple_search_ads__keyword_report_keyword_id"], "unique_id": "test.apple_search_ads.not_null_apple_search_ads__keyword_report_keyword_id.ea493710db", "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "package_name": "apple_search_ads", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads", "path": "not_null_apple_search_ads__keyword_report_keyword_id.sql", "original_file_path": "models/apple_search_ads.yml", "name": "not_null_apple_search_ads__keyword_report_keyword_id", "alias": "not_null_apple_search_ads__keyword_report_keyword_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["apple_search_ads__keyword_report"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads/models/apple_search_ads.yml/not_null_apple_search_ads__keyword_report_keyword_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1671505473.4927528, "compiled_code": "\n \n \n\n\n\nselect keyword_id\nfrom \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads\".\"apple_search_ads__keyword_report\"\nwhere keyword_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "keyword_id", "file_key_name": "models.apple_search_ads__keyword_report"}, "test.apple_search_ads.not_null_apple_search_ads__keyword_report_date_day.3dec8d0e82": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('apple_search_ads__keyword_report')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads.apple_search_ads__keyword_report"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "postgres", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads", "not_null_apple_search_ads__keyword_report_date_day"], "unique_id": "test.apple_search_ads.not_null_apple_search_ads__keyword_report_date_day.3dec8d0e82", "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "package_name": "apple_search_ads", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads", "path": "not_null_apple_search_ads__keyword_report_date_day.sql", "original_file_path": "models/apple_search_ads.yml", "name": "not_null_apple_search_ads__keyword_report_date_day", "alias": "not_null_apple_search_ads__keyword_report_date_day", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["apple_search_ads__keyword_report"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads/models/apple_search_ads.yml/not_null_apple_search_ads__keyword_report_date_day.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1671505473.493771, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads\".\"apple_search_ads__keyword_report\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "date_day", "file_key_name": "models.apple_search_ads__keyword_report"}, "test.apple_search_ads.dbt_utils_unique_combination_of_columns_apple_search_ads__keyword_report_organization_id__campaign_id__ad_group_id__keyword_id__date_day.78fb033a13": {"test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["organization_id", "campaign_id", "ad_group_id", "keyword_id", "date_day"], "model": "{{ get_where_subquery(ref('apple_search_ads__keyword_report')) }}"}, "namespace": "dbt_utils"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_utils.test_unique_combination_of_columns", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads.apple_search_ads__keyword_report"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_533c8551a101baa56c397525cb8a9246", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "postgres", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads", "dbt_utils_unique_combination_of_columns_apple_search_ads__keyword_report_organization_id__campaign_id__ad_group_id__keyword_id__date_day"], "unique_id": "test.apple_search_ads.dbt_utils_unique_combination_of_columns_apple_search_ads__keyword_report_organization_id__campaign_id__ad_group_id__keyword_id__date_day.78fb033a13", "raw_code": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_533c8551a101baa56c397525cb8a9246\") }}", "language": "sql", "package_name": "apple_search_ads", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads", "path": "dbt_utils_unique_combination_o_533c8551a101baa56c397525cb8a9246.sql", "original_file_path": "models/apple_search_ads.yml", "name": "dbt_utils_unique_combination_of_columns_apple_search_ads__keyword_report_organization_id__campaign_id__ad_group_id__keyword_id__date_day", "alias": "dbt_utils_unique_combination_o_533c8551a101baa56c397525cb8a9246", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["apple_search_ads__keyword_report"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads/models/apple_search_ads.yml/dbt_utils_unique_combination_o_533c8551a101baa56c397525cb8a9246.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_533c8551a101baa56c397525cb8a9246"}, "created_at": 1671505473.4949162, "compiled_code": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n organization_id, campaign_id, ad_group_id, keyword_id, date_day\n from \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads\".\"apple_search_ads__keyword_report\"\n group by organization_id, campaign_id, ad_group_id, keyword_id, date_day\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": null, "file_key_name": "models.apple_search_ads__keyword_report"}, "test.apple_search_ads.not_null_apple_search_ads__organization_report_organization_id.b6cf7d69f8": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "organization_id", "model": "{{ get_where_subquery(ref('apple_search_ads__organization_report')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads.apple_search_ads__organization_report"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "postgres", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads", "not_null_apple_search_ads__organization_report_organization_id"], "unique_id": "test.apple_search_ads.not_null_apple_search_ads__organization_report_organization_id.b6cf7d69f8", "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "package_name": "apple_search_ads", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads", "path": "not_null_apple_search_ads__organization_report_organization_id.sql", "original_file_path": "models/apple_search_ads.yml", "name": "not_null_apple_search_ads__organization_report_organization_id", "alias": "not_null_apple_search_ads__organization_report_organization_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["apple_search_ads__organization_report"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads/models/apple_search_ads.yml/not_null_apple_search_ads__organization_report_organization_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1671505473.49805, "compiled_code": "\n \n \n\n\n\nselect organization_id\nfrom \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads\".\"apple_search_ads__organization_report\"\nwhere organization_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "organization_id", "file_key_name": "models.apple_search_ads__organization_report"}, "test.apple_search_ads.not_null_apple_search_ads__organization_report_date_day.5784fed523": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('apple_search_ads__organization_report')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads.apple_search_ads__organization_report"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "postgres", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads", "not_null_apple_search_ads__organization_report_date_day"], "unique_id": "test.apple_search_ads.not_null_apple_search_ads__organization_report_date_day.5784fed523", "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "package_name": "apple_search_ads", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads", "path": "not_null_apple_search_ads__organization_report_date_day.sql", "original_file_path": "models/apple_search_ads.yml", "name": "not_null_apple_search_ads__organization_report_date_day", "alias": "not_null_apple_search_ads__organization_report_date_day", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["apple_search_ads__organization_report"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads/models/apple_search_ads.yml/not_null_apple_search_ads__organization_report_date_day.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1671505473.499035, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads\".\"apple_search_ads__organization_report\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "date_day", "file_key_name": "models.apple_search_ads__organization_report"}, "test.apple_search_ads.dbt_utils_unique_combination_of_columns_apple_search_ads__organization_report_organization_id__date_day.8bc84fccc3": {"test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["organization_id", "date_day"], "model": "{{ get_where_subquery(ref('apple_search_ads__organization_report')) }}"}, "namespace": "dbt_utils"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_utils.test_unique_combination_of_columns", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads.apple_search_ads__organization_report"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_f2f453668a8bb7c0387ed85fc7bfaf2d", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "postgres", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads", "dbt_utils_unique_combination_of_columns_apple_search_ads__organization_report_organization_id__date_day"], "unique_id": "test.apple_search_ads.dbt_utils_unique_combination_of_columns_apple_search_ads__organization_report_organization_id__date_day.8bc84fccc3", "raw_code": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_f2f453668a8bb7c0387ed85fc7bfaf2d\") }}", "language": "sql", "package_name": "apple_search_ads", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads", "path": "dbt_utils_unique_combination_o_f2f453668a8bb7c0387ed85fc7bfaf2d.sql", "original_file_path": "models/apple_search_ads.yml", "name": "dbt_utils_unique_combination_of_columns_apple_search_ads__organization_report_organization_id__date_day", "alias": "dbt_utils_unique_combination_o_f2f453668a8bb7c0387ed85fc7bfaf2d", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["apple_search_ads__organization_report"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads/models/apple_search_ads.yml/dbt_utils_unique_combination_o_f2f453668a8bb7c0387ed85fc7bfaf2d.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_f2f453668a8bb7c0387ed85fc7bfaf2d"}, "created_at": 1671505473.500013, "compiled_code": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n organization_id, date_day\n from \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads\".\"apple_search_ads__organization_report\"\n group by organization_id, date_day\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": null, "file_key_name": "models.apple_search_ads__organization_report"}, "test.apple_search_ads.not_null_apple_search_ads__search_term_report_date_day.1bc3b0d57c": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('apple_search_ads__search_term_report')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads.apple_search_ads__search_term_report"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "postgres", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads", "not_null_apple_search_ads__search_term_report_date_day"], "unique_id": "test.apple_search_ads.not_null_apple_search_ads__search_term_report_date_day.1bc3b0d57c", "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "package_name": "apple_search_ads", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads", "path": "not_null_apple_search_ads__search_term_report_date_day.sql", "original_file_path": "models/apple_search_ads.yml", "name": "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": ""}, "tags": [], "refs": [["apple_search_ads__search_term_report"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads/models/apple_search_ads.yml/not_null_apple_search_ads__search_term_report_date_day.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1671505473.502753, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads\".\"apple_search_ads__search_term_report\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "date_day", "file_key_name": "models.apple_search_ads__search_term_report"}, "test.apple_search_ads.not_null_apple_search_ads__search_term_report_search_term_text.aecc7447f7": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "search_term_text", "model": "{{ get_where_subquery(ref('apple_search_ads__search_term_report')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads.apple_search_ads__search_term_report"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "postgres", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads", "not_null_apple_search_ads__search_term_report_search_term_text"], "unique_id": "test.apple_search_ads.not_null_apple_search_ads__search_term_report_search_term_text.aecc7447f7", "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "package_name": "apple_search_ads", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads", "path": "not_null_apple_search_ads__search_term_report_search_term_text.sql", "original_file_path": "models/apple_search_ads.yml", "name": "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": ""}, "tags": [], "refs": [["apple_search_ads__search_term_report"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads/models/apple_search_ads.yml/not_null_apple_search_ads__search_term_report_search_term_text.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1671505473.503733, "compiled_code": "\n \n \n\n\n\nselect search_term_text\nfrom \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads\".\"apple_search_ads__search_term_report\"\nwhere search_term_text is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "search_term_text", "file_key_name": "models.apple_search_ads__search_term_report"}, "test.apple_search_ads.dbt_utils_unique_combination_of_columns_apple_search_ads__search_term_report_search_term_text__date_day.e60fe79ec4": {"test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["search_term_text", "date_day"], "model": "{{ get_where_subquery(ref('apple_search_ads__search_term_report')) }}"}, "namespace": "dbt_utils"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_utils.test_unique_combination_of_columns", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads.apple_search_ads__search_term_report"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_7c3690db5ce751fbf1f2dff07b3a8690", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "postgres", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads", "dbt_utils_unique_combination_of_columns_apple_search_ads__search_term_report_search_term_text__date_day"], "unique_id": "test.apple_search_ads.dbt_utils_unique_combination_of_columns_apple_search_ads__search_term_report_search_term_text__date_day.e60fe79ec4", "raw_code": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_7c3690db5ce751fbf1f2dff07b3a8690\") }}", "language": "sql", "package_name": "apple_search_ads", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads", "path": "dbt_utils_unique_combination_o_7c3690db5ce751fbf1f2dff07b3a8690.sql", "original_file_path": "models/apple_search_ads.yml", "name": "dbt_utils_unique_combination_of_columns_apple_search_ads__search_term_report_search_term_text__date_day", "alias": "dbt_utils_unique_combination_o_7c3690db5ce751fbf1f2dff07b3a8690", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["apple_search_ads__search_term_report"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads/models/apple_search_ads.yml/dbt_utils_unique_combination_o_7c3690db5ce751fbf1f2dff07b3a8690.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_7c3690db5ce751fbf1f2dff07b3a8690"}, "created_at": 1671505473.505158, "compiled_code": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n search_term_text, date_day\n from \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads\".\"apple_search_ads__search_term_report\"\n group by search_term_text, date_day\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": null, "file_key_name": "models.apple_search_ads__search_term_report"}, "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_group_history_modified_at.e5d65fa28f": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "modified_at", "model": "{{ get_where_subquery(ref('stg_apple_search_ads__ad_group_history')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__ad_group_history"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "postgres", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads_source", "not_null_stg_apple_search_ads__ad_group_history_modified_at"], "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_group_history_modified_at.e5d65fa28f", "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "not_null_stg_apple_search_ads__ad_group_history_modified_at.sql", "original_file_path": "models/stg_apple_search_ads.yml", "name": "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": ""}, "tags": [], "refs": [["stg_apple_search_ads__ad_group_history"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads.yml/not_null_stg_apple_search_ads__ad_group_history_modified_at.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1671505473.550115, "compiled_code": "\n \n \n\n\n\nselect modified_at\nfrom \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__ad_group_history\"\nwhere modified_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "modified_at", "file_key_name": "models.stg_apple_search_ads__ad_group_history"}, "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_group_history_ad_group_id.dc128eecb7": {"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}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__ad_group_history"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "postgres", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads_source", "not_null_stg_apple_search_ads__ad_group_history_ad_group_id"], "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_group_history_ad_group_id.dc128eecb7", "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "not_null_stg_apple_search_ads__ad_group_history_ad_group_id.sql", "original_file_path": "models/stg_apple_search_ads.yml", "name": "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": ""}, "tags": [], "refs": [["stg_apple_search_ads__ad_group_history"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads.yml/not_null_stg_apple_search_ads__ad_group_history_ad_group_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1671505473.5512068, "compiled_code": "\n \n \n\n\n\nselect ad_group_id\nfrom \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__ad_group_history\"\nwhere ad_group_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "ad_group_id", "file_key_name": "models.stg_apple_search_ads__ad_group_history"}, "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__ad_group_history_ad_group_id__modified_at.84af14c83b": {"test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["ad_group_id", "modified_at"], "model": "{{ get_where_subquery(ref('stg_apple_search_ads__ad_group_history')) }}"}, "namespace": "dbt_utils"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_utils.test_unique_combination_of_columns", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__ad_group_history"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_d82553a0f3b4daa8d59460c85a542d4f", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "postgres", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads_source", "dbt_utils_unique_combination_of_columns_stg_apple_search_ads__ad_group_history_ad_group_id__modified_at"], "unique_id": "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__ad_group_history_ad_group_id__modified_at.84af14c83b", "raw_code": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_d82553a0f3b4daa8d59460c85a542d4f\") }}", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "dbt_utils_unique_combination_o_d82553a0f3b4daa8d59460c85a542d4f.sql", "original_file_path": "models/stg_apple_search_ads.yml", "name": "dbt_utils_unique_combination_of_columns_stg_apple_search_ads__ad_group_history_ad_group_id__modified_at", "alias": "dbt_utils_unique_combination_o_d82553a0f3b4daa8d59460c85a542d4f", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_apple_search_ads__ad_group_history"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads.yml/dbt_utils_unique_combination_o_d82553a0f3b4daa8d59460c85a542d4f.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_d82553a0f3b4daa8d59460c85a542d4f"}, "created_at": 1671505473.552304, "compiled_code": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n ad_group_id, modified_at\n from \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__ad_group_history\"\n group by ad_group_id, modified_at\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": null, "file_key_name": "models.stg_apple_search_ads__ad_group_history"}, "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_group_report_ad_group_id.a115f9cfc1": {"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}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__ad_group_report"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "postgres", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads_source", "not_null_stg_apple_search_ads__ad_group_report_ad_group_id"], "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_group_report_ad_group_id.a115f9cfc1", "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "not_null_stg_apple_search_ads__ad_group_report_ad_group_id.sql", "original_file_path": "models/stg_apple_search_ads.yml", "name": "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": ""}, "tags": [], "refs": [["stg_apple_search_ads__ad_group_report"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads.yml/not_null_stg_apple_search_ads__ad_group_report_ad_group_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1671505473.55516, "compiled_code": "\n \n \n\n\n\nselect ad_group_id\nfrom \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__ad_group_report\"\nwhere ad_group_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "ad_group_id", "file_key_name": "models.stg_apple_search_ads__ad_group_report"}, "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_group_report_date_day.4dfd46a43b": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('stg_apple_search_ads__ad_group_report')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__ad_group_report"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "postgres", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads_source", "not_null_stg_apple_search_ads__ad_group_report_date_day"], "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_group_report_date_day.4dfd46a43b", "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "not_null_stg_apple_search_ads__ad_group_report_date_day.sql", "original_file_path": "models/stg_apple_search_ads.yml", "name": "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": ""}, "tags": [], "refs": [["stg_apple_search_ads__ad_group_report"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads.yml/not_null_stg_apple_search_ads__ad_group_report_date_day.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1671505473.5561512, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__ad_group_report\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "date_day", "file_key_name": "models.stg_apple_search_ads__ad_group_report"}, "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__ad_group_report_ad_group_id__date_day.a0fcc4e33c": {"test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["ad_group_id", "date_day"], "model": "{{ get_where_subquery(ref('stg_apple_search_ads__ad_group_report')) }}"}, "namespace": "dbt_utils"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_utils.test_unique_combination_of_columns", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__ad_group_report"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_107a9492c163887581fde6b34131e42d", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "postgres", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads_source", "dbt_utils_unique_combination_of_columns_stg_apple_search_ads__ad_group_report_ad_group_id__date_day"], "unique_id": "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__ad_group_report_ad_group_id__date_day.a0fcc4e33c", "raw_code": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_107a9492c163887581fde6b34131e42d\") }}", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "dbt_utils_unique_combination_o_107a9492c163887581fde6b34131e42d.sql", "original_file_path": "models/stg_apple_search_ads.yml", "name": "dbt_utils_unique_combination_of_columns_stg_apple_search_ads__ad_group_report_ad_group_id__date_day", "alias": "dbt_utils_unique_combination_o_107a9492c163887581fde6b34131e42d", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_apple_search_ads__ad_group_report"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads.yml/dbt_utils_unique_combination_o_107a9492c163887581fde6b34131e42d.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_107a9492c163887581fde6b34131e42d"}, "created_at": 1671505473.557277, "compiled_code": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n ad_group_id, date_day\n from \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__ad_group_report\"\n group by ad_group_id, date_day\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": null, "file_key_name": "models.stg_apple_search_ads__ad_group_report"}, "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_history_modified_at.2eea7e006d": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "modified_at", "model": "{{ get_where_subquery(ref('stg_apple_search_ads__ad_history')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__ad_history"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "postgres", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads_source", "not_null_stg_apple_search_ads__ad_history_modified_at"], "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_history_modified_at.2eea7e006d", "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "not_null_stg_apple_search_ads__ad_history_modified_at.sql", "original_file_path": "models/stg_apple_search_ads.yml", "name": "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": ""}, "tags": [], "refs": [["stg_apple_search_ads__ad_history"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads.yml/not_null_stg_apple_search_ads__ad_history_modified_at.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1671505473.559915, "compiled_code": "\n \n \n\n\n\nselect modified_at\nfrom \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__ad_history\"\nwhere modified_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "modified_at", "file_key_name": "models.stg_apple_search_ads__ad_history"}, "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_history_ad_id.4ad3bde32a": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "ad_id", "model": "{{ get_where_subquery(ref('stg_apple_search_ads__ad_history')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__ad_history"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "postgres", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads_source", "not_null_stg_apple_search_ads__ad_history_ad_id"], "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_history_ad_id.4ad3bde32a", "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "not_null_stg_apple_search_ads__ad_history_ad_id.sql", "original_file_path": "models/stg_apple_search_ads.yml", "name": "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": ""}, "tags": [], "refs": [["stg_apple_search_ads__ad_history"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads.yml/not_null_stg_apple_search_ads__ad_history_ad_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1671505473.561076, "compiled_code": "\n \n \n\n\n\nselect ad_id\nfrom \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__ad_history\"\nwhere ad_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "ad_id", "file_key_name": "models.stg_apple_search_ads__ad_history"}, "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__ad_history_ad_id__modified_at.38599b8cba": {"test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["ad_id", "modified_at"], "model": "{{ get_where_subquery(ref('stg_apple_search_ads__ad_history')) }}"}, "namespace": "dbt_utils"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_utils.test_unique_combination_of_columns", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__ad_history"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_ed0f61b146739c836defcf2fb6005d31", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "postgres", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads_source", "dbt_utils_unique_combination_of_columns_stg_apple_search_ads__ad_history_ad_id__modified_at"], "unique_id": "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__ad_history_ad_id__modified_at.38599b8cba", "raw_code": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_ed0f61b146739c836defcf2fb6005d31\") }}", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "dbt_utils_unique_combination_o_ed0f61b146739c836defcf2fb6005d31.sql", "original_file_path": "models/stg_apple_search_ads.yml", "name": "dbt_utils_unique_combination_of_columns_stg_apple_search_ads__ad_history_ad_id__modified_at", "alias": "dbt_utils_unique_combination_o_ed0f61b146739c836defcf2fb6005d31", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_apple_search_ads__ad_history"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads.yml/dbt_utils_unique_combination_o_ed0f61b146739c836defcf2fb6005d31.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_ed0f61b146739c836defcf2fb6005d31"}, "created_at": 1671505473.562075, "compiled_code": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n ad_id, modified_at\n from \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__ad_history\"\n group by ad_id, modified_at\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": null, "file_key_name": "models.stg_apple_search_ads__ad_history"}, "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_report_date_day.e6252346d8": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('stg_apple_search_ads__ad_report')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__ad_report"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "postgres", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads_source", "not_null_stg_apple_search_ads__ad_report_date_day"], "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_report_date_day.e6252346d8", "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "not_null_stg_apple_search_ads__ad_report_date_day.sql", "original_file_path": "models/stg_apple_search_ads.yml", "name": "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": ""}, "tags": [], "refs": [["stg_apple_search_ads__ad_report"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads.yml/not_null_stg_apple_search_ads__ad_report_date_day.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1671505473.564951, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__ad_report\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "date_day", "file_key_name": "models.stg_apple_search_ads__ad_report"}, "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_report_ad_group_id.a397755e9f": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "ad_group_id", "model": "{{ get_where_subquery(ref('stg_apple_search_ads__ad_report')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__ad_report"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "postgres", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads_source", "not_null_stg_apple_search_ads__ad_report_ad_group_id"], "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_report_ad_group_id.a397755e9f", "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "not_null_stg_apple_search_ads__ad_report_ad_group_id.sql", "original_file_path": "models/stg_apple_search_ads.yml", "name": "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": ""}, "tags": [], "refs": [["stg_apple_search_ads__ad_report"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads.yml/not_null_stg_apple_search_ads__ad_report_ad_group_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1671505473.5659342, "compiled_code": "\n \n \n\n\n\nselect ad_group_id\nfrom \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__ad_report\"\nwhere ad_group_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "ad_group_id", "file_key_name": "models.stg_apple_search_ads__ad_report"}, "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_report_ad_id.d08e760c58": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "ad_id", "model": "{{ get_where_subquery(ref('stg_apple_search_ads__ad_report')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__ad_report"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "postgres", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads_source", "not_null_stg_apple_search_ads__ad_report_ad_id"], "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_report_ad_id.d08e760c58", "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "not_null_stg_apple_search_ads__ad_report_ad_id.sql", "original_file_path": "models/stg_apple_search_ads.yml", "name": "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": ""}, "tags": [], "refs": [["stg_apple_search_ads__ad_report"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads.yml/not_null_stg_apple_search_ads__ad_report_ad_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1671505473.5669062, "compiled_code": "\n \n \n\n\n\nselect ad_id\nfrom \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__ad_report\"\nwhere ad_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "ad_id", "file_key_name": "models.stg_apple_search_ads__ad_report"}, "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__ad_report_ad_id__date_day__ad_group_id.0d8d23c516": {"test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["ad_id", "date_day", "ad_group_id"], "model": "{{ get_where_subquery(ref('stg_apple_search_ads__ad_report')) }}"}, "namespace": "dbt_utils"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_utils.test_unique_combination_of_columns", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__ad_report"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_9ce5e828ce9fa0987b5e86cbcb1207b9", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "postgres", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads_source", "dbt_utils_unique_combination_of_columns_stg_apple_search_ads__ad_report_ad_id__date_day__ad_group_id"], "unique_id": "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__ad_report_ad_id__date_day__ad_group_id.0d8d23c516", "raw_code": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_9ce5e828ce9fa0987b5e86cbcb1207b9\") }}", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "dbt_utils_unique_combination_o_9ce5e828ce9fa0987b5e86cbcb1207b9.sql", "original_file_path": "models/stg_apple_search_ads.yml", "name": "dbt_utils_unique_combination_of_columns_stg_apple_search_ads__ad_report_ad_id__date_day__ad_group_id", "alias": "dbt_utils_unique_combination_o_9ce5e828ce9fa0987b5e86cbcb1207b9", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_apple_search_ads__ad_report"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads.yml/dbt_utils_unique_combination_o_9ce5e828ce9fa0987b5e86cbcb1207b9.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_9ce5e828ce9fa0987b5e86cbcb1207b9"}, "created_at": 1671505473.568012, "compiled_code": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n ad_id, date_day, ad_group_id\n from \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__ad_report\"\n group by ad_id, date_day, ad_group_id\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": null, "file_key_name": "models.stg_apple_search_ads__ad_report"}, "test.apple_search_ads_source.not_null_stg_apple_search_ads__campaign_history_modified_at.f34a7a97c9": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "modified_at", "model": "{{ get_where_subquery(ref('stg_apple_search_ads__campaign_history')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__campaign_history"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "postgres", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads_source", "not_null_stg_apple_search_ads__campaign_history_modified_at"], "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__campaign_history_modified_at.f34a7a97c9", "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "not_null_stg_apple_search_ads__campaign_history_modified_at.sql", "original_file_path": "models/stg_apple_search_ads.yml", "name": "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": ""}, "tags": [], "refs": [["stg_apple_search_ads__campaign_history"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads.yml/not_null_stg_apple_search_ads__campaign_history_modified_at.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1671505473.570766, "compiled_code": "\n \n \n\n\n\nselect modified_at\nfrom \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__campaign_history\"\nwhere modified_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "modified_at", "file_key_name": "models.stg_apple_search_ads__campaign_history"}, "test.apple_search_ads_source.not_null_stg_apple_search_ads__campaign_history_campaign_id.3f0f7502b8": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "campaign_id", "model": "{{ get_where_subquery(ref('stg_apple_search_ads__campaign_history')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__campaign_history"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "postgres", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads_source", "not_null_stg_apple_search_ads__campaign_history_campaign_id"], "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__campaign_history_campaign_id.3f0f7502b8", "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "not_null_stg_apple_search_ads__campaign_history_campaign_id.sql", "original_file_path": "models/stg_apple_search_ads.yml", "name": "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": ""}, "tags": [], "refs": [["stg_apple_search_ads__campaign_history"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads.yml/not_null_stg_apple_search_ads__campaign_history_campaign_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1671505473.571882, "compiled_code": "\n \n \n\n\n\nselect campaign_id\nfrom \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__campaign_history\"\nwhere campaign_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "campaign_id", "file_key_name": "models.stg_apple_search_ads__campaign_history"}, "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__campaign_history_campaign_id__modified_at.317f970af9": {"test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["campaign_id", "modified_at"], "model": "{{ get_where_subquery(ref('stg_apple_search_ads__campaign_history')) }}"}, "namespace": "dbt_utils"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_utils.test_unique_combination_of_columns", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__campaign_history"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_055fa7e8a6c292e0f56d1feec61284a9", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "postgres", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads_source", "dbt_utils_unique_combination_of_columns_stg_apple_search_ads__campaign_history_campaign_id__modified_at"], "unique_id": "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__campaign_history_campaign_id__modified_at.317f970af9", "raw_code": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_055fa7e8a6c292e0f56d1feec61284a9\") }}", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "dbt_utils_unique_combination_o_055fa7e8a6c292e0f56d1feec61284a9.sql", "original_file_path": "models/stg_apple_search_ads.yml", "name": "dbt_utils_unique_combination_of_columns_stg_apple_search_ads__campaign_history_campaign_id__modified_at", "alias": "dbt_utils_unique_combination_o_055fa7e8a6c292e0f56d1feec61284a9", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_apple_search_ads__campaign_history"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads.yml/dbt_utils_unique_combination_o_055fa7e8a6c292e0f56d1feec61284a9.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_055fa7e8a6c292e0f56d1feec61284a9"}, "created_at": 1671505473.572866, "compiled_code": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n campaign_id, modified_at\n from \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__campaign_history\"\n group by campaign_id, modified_at\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": null, "file_key_name": "models.stg_apple_search_ads__campaign_history"}, "test.apple_search_ads_source.not_null_stg_apple_search_ads__campaign_report_campaign_id.b83941e728": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "campaign_id", "model": "{{ get_where_subquery(ref('stg_apple_search_ads__campaign_report')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__campaign_report"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "postgres", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads_source", "not_null_stg_apple_search_ads__campaign_report_campaign_id"], "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__campaign_report_campaign_id.b83941e728", "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "not_null_stg_apple_search_ads__campaign_report_campaign_id.sql", "original_file_path": "models/stg_apple_search_ads.yml", "name": "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": ""}, "tags": [], "refs": [["stg_apple_search_ads__campaign_report"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads.yml/not_null_stg_apple_search_ads__campaign_report_campaign_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1671505473.575673, "compiled_code": "\n \n \n\n\n\nselect campaign_id\nfrom \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__campaign_report\"\nwhere campaign_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "campaign_id", "file_key_name": "models.stg_apple_search_ads__campaign_report"}, "test.apple_search_ads_source.not_null_stg_apple_search_ads__campaign_report_date_day.c8dc10a6f3": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('stg_apple_search_ads__campaign_report')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__campaign_report"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "postgres", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads_source", "not_null_stg_apple_search_ads__campaign_report_date_day"], "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__campaign_report_date_day.c8dc10a6f3", "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "not_null_stg_apple_search_ads__campaign_report_date_day.sql", "original_file_path": "models/stg_apple_search_ads.yml", "name": "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": ""}, "tags": [], "refs": [["stg_apple_search_ads__campaign_report"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads.yml/not_null_stg_apple_search_ads__campaign_report_date_day.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1671505473.57671, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__campaign_report\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "date_day", "file_key_name": "models.stg_apple_search_ads__campaign_report"}, "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__campaign_report_campaign_id__date_day.bad41b0481": {"test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["campaign_id", "date_day"], "model": "{{ get_where_subquery(ref('stg_apple_search_ads__campaign_report')) }}"}, "namespace": "dbt_utils"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_utils.test_unique_combination_of_columns", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__campaign_report"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_d8bdb244aa45cb237ef5189371733c07", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "postgres", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads_source", "dbt_utils_unique_combination_of_columns_stg_apple_search_ads__campaign_report_campaign_id__date_day"], "unique_id": "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__campaign_report_campaign_id__date_day.bad41b0481", "raw_code": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_d8bdb244aa45cb237ef5189371733c07\") }}", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "dbt_utils_unique_combination_o_d8bdb244aa45cb237ef5189371733c07.sql", "original_file_path": "models/stg_apple_search_ads.yml", "name": "dbt_utils_unique_combination_of_columns_stg_apple_search_ads__campaign_report_campaign_id__date_day", "alias": "dbt_utils_unique_combination_o_d8bdb244aa45cb237ef5189371733c07", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_apple_search_ads__campaign_report"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads.yml/dbt_utils_unique_combination_o_d8bdb244aa45cb237ef5189371733c07.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_d8bdb244aa45cb237ef5189371733c07"}, "created_at": 1671505473.5777102, "compiled_code": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n campaign_id, date_day\n from \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__campaign_report\"\n group by campaign_id, date_day\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": null, "file_key_name": "models.stg_apple_search_ads__campaign_report"}, "test.apple_search_ads_source.not_null_stg_apple_search_ads__keyword_history_modified_at.42fde5a287": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "modified_at", "model": "{{ get_where_subquery(ref('stg_apple_search_ads__keyword_history')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__keyword_history"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "postgres", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads_source", "not_null_stg_apple_search_ads__keyword_history_modified_at"], "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__keyword_history_modified_at.42fde5a287", "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "not_null_stg_apple_search_ads__keyword_history_modified_at.sql", "original_file_path": "models/stg_apple_search_ads.yml", "name": "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": ""}, "tags": [], "refs": [["stg_apple_search_ads__keyword_history"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads.yml/not_null_stg_apple_search_ads__keyword_history_modified_at.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1671505473.58043, "compiled_code": "\n \n \n\n\n\nselect modified_at\nfrom \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__keyword_history\"\nwhere modified_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "modified_at", "file_key_name": "models.stg_apple_search_ads__keyword_history"}, "test.apple_search_ads_source.not_null_stg_apple_search_ads__keyword_history_keyword_id.889f83cfd2": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "keyword_id", "model": "{{ get_where_subquery(ref('stg_apple_search_ads__keyword_history')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__keyword_history"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "postgres", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads_source", "not_null_stg_apple_search_ads__keyword_history_keyword_id"], "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__keyword_history_keyword_id.889f83cfd2", "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "not_null_stg_apple_search_ads__keyword_history_keyword_id.sql", "original_file_path": "models/stg_apple_search_ads.yml", "name": "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": ""}, "tags": [], "refs": [["stg_apple_search_ads__keyword_history"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads.yml/not_null_stg_apple_search_ads__keyword_history_keyword_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1671505473.581402, "compiled_code": "\n \n \n\n\n\nselect keyword_id\nfrom \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__keyword_history\"\nwhere keyword_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "keyword_id", "file_key_name": "models.stg_apple_search_ads__keyword_history"}, "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__keyword_history_keyword_id__modified_at.7b06162d24": {"test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["keyword_id", "modified_at"], "model": "{{ get_where_subquery(ref('stg_apple_search_ads__keyword_history')) }}"}, "namespace": "dbt_utils"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_utils.test_unique_combination_of_columns", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__keyword_history"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_26b09b2f81a50b0ba84b566cd7df85b5", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "postgres", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads_source", "dbt_utils_unique_combination_of_columns_stg_apple_search_ads__keyword_history_keyword_id__modified_at"], "unique_id": "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__keyword_history_keyword_id__modified_at.7b06162d24", "raw_code": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_26b09b2f81a50b0ba84b566cd7df85b5\") }}", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "dbt_utils_unique_combination_o_26b09b2f81a50b0ba84b566cd7df85b5.sql", "original_file_path": "models/stg_apple_search_ads.yml", "name": "dbt_utils_unique_combination_of_columns_stg_apple_search_ads__keyword_history_keyword_id__modified_at", "alias": "dbt_utils_unique_combination_o_26b09b2f81a50b0ba84b566cd7df85b5", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_apple_search_ads__keyword_history"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads.yml/dbt_utils_unique_combination_o_26b09b2f81a50b0ba84b566cd7df85b5.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_26b09b2f81a50b0ba84b566cd7df85b5"}, "created_at": 1671505473.5825121, "compiled_code": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n keyword_id, modified_at\n from \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__keyword_history\"\n group by keyword_id, modified_at\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": null, "file_key_name": "models.stg_apple_search_ads__keyword_history"}, "test.apple_search_ads_source.not_null_stg_apple_search_ads__keyword_report_keyword_id.501725b09e": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "keyword_id", "model": "{{ get_where_subquery(ref('stg_apple_search_ads__keyword_report')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__keyword_report"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "postgres", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads_source", "not_null_stg_apple_search_ads__keyword_report_keyword_id"], "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__keyword_report_keyword_id.501725b09e", "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "not_null_stg_apple_search_ads__keyword_report_keyword_id.sql", "original_file_path": "models/stg_apple_search_ads.yml", "name": "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": ""}, "tags": [], "refs": [["stg_apple_search_ads__keyword_report"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads.yml/not_null_stg_apple_search_ads__keyword_report_keyword_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1671505473.585362, "compiled_code": "\n \n \n\n\n\nselect keyword_id\nfrom \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__keyword_report\"\nwhere keyword_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "keyword_id", "file_key_name": "models.stg_apple_search_ads__keyword_report"}, "test.apple_search_ads_source.not_null_stg_apple_search_ads__keyword_report_date_day.16098db928": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('stg_apple_search_ads__keyword_report')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__keyword_report"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "postgres", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads_source", "not_null_stg_apple_search_ads__keyword_report_date_day"], "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__keyword_report_date_day.16098db928", "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "not_null_stg_apple_search_ads__keyword_report_date_day.sql", "original_file_path": "models/stg_apple_search_ads.yml", "name": "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": ""}, "tags": [], "refs": [["stg_apple_search_ads__keyword_report"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads.yml/not_null_stg_apple_search_ads__keyword_report_date_day.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1671505473.586375, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__keyword_report\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "date_day", "file_key_name": "models.stg_apple_search_ads__keyword_report"}, "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__keyword_report_keyword_id__date_day.9f0099cff8": {"test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["keyword_id", "date_day"], "model": "{{ get_where_subquery(ref('stg_apple_search_ads__keyword_report')) }}"}, "namespace": "dbt_utils"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_utils.test_unique_combination_of_columns", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__keyword_report"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_2ec7f68205f05a3b68cfa7324135a1a5", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "postgres", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads_source", "dbt_utils_unique_combination_of_columns_stg_apple_search_ads__keyword_report_keyword_id__date_day"], "unique_id": "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__keyword_report_keyword_id__date_day.9f0099cff8", "raw_code": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_2ec7f68205f05a3b68cfa7324135a1a5\") }}", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "dbt_utils_unique_combination_o_2ec7f68205f05a3b68cfa7324135a1a5.sql", "original_file_path": "models/stg_apple_search_ads.yml", "name": "dbt_utils_unique_combination_of_columns_stg_apple_search_ads__keyword_report_keyword_id__date_day", "alias": "dbt_utils_unique_combination_o_2ec7f68205f05a3b68cfa7324135a1a5", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_apple_search_ads__keyword_report"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads.yml/dbt_utils_unique_combination_o_2ec7f68205f05a3b68cfa7324135a1a5.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_2ec7f68205f05a3b68cfa7324135a1a5"}, "created_at": 1671505473.5873668, "compiled_code": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n keyword_id, date_day\n from \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__keyword_report\"\n group by keyword_id, date_day\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": null, "file_key_name": "models.stg_apple_search_ads__keyword_report"}, "test.apple_search_ads_source.not_null_stg_apple_search_ads__organization_organization_id.b013ce33cb": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "organization_id", "model": "{{ get_where_subquery(ref('stg_apple_search_ads__organization')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__organization"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "postgres", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads_source", "not_null_stg_apple_search_ads__organization_organization_id"], "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__organization_organization_id.b013ce33cb", "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "not_null_stg_apple_search_ads__organization_organization_id.sql", "original_file_path": "models/stg_apple_search_ads.yml", "name": "not_null_stg_apple_search_ads__organization_organization_id", "alias": "not_null_stg_apple_search_ads__organization_organization_id", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_apple_search_ads__organization"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads.yml/not_null_stg_apple_search_ads__organization_organization_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1671505473.590063, "compiled_code": "\n \n \n\n\n\nselect organization_id\nfrom \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__organization\"\nwhere organization_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "organization_id", "file_key_name": "models.stg_apple_search_ads__organization"}, "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__organization_organization_id.8647048f7a": {"test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["organization_id"], "model": "{{ get_where_subquery(ref('stg_apple_search_ads__organization')) }}"}, "namespace": "dbt_utils"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_utils.test_unique_combination_of_columns", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__organization"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_53ded9060f9d3981217ae23e5d2ba89b", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "postgres", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads_source", "dbt_utils_unique_combination_of_columns_stg_apple_search_ads__organization_organization_id"], "unique_id": "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__organization_organization_id.8647048f7a", "raw_code": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_53ded9060f9d3981217ae23e5d2ba89b\") }}", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "dbt_utils_unique_combination_o_53ded9060f9d3981217ae23e5d2ba89b.sql", "original_file_path": "models/stg_apple_search_ads.yml", "name": "dbt_utils_unique_combination_of_columns_stg_apple_search_ads__organization_organization_id", "alias": "dbt_utils_unique_combination_o_53ded9060f9d3981217ae23e5d2ba89b", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_apple_search_ads__organization"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads.yml/dbt_utils_unique_combination_o_53ded9060f9d3981217ae23e5d2ba89b.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_53ded9060f9d3981217ae23e5d2ba89b"}, "created_at": 1671505473.591072, "compiled_code": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n organization_id\n from \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__organization\"\n group by organization_id\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": null, "file_key_name": "models.stg_apple_search_ads__organization"}, "test.apple_search_ads_source.not_null_stg_apple_search_ads__search_term_report__fivetran_id.aa430d1dad": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "_fivetran_id", "model": "{{ get_where_subquery(ref('stg_apple_search_ads__search_term_report')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__search_term_report"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "postgres", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads_source", "not_null_stg_apple_search_ads__search_term_report__fivetran_id"], "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__search_term_report__fivetran_id.aa430d1dad", "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "not_null_stg_apple_search_ads__search_term_report__fivetran_id.sql", "original_file_path": "models/stg_apple_search_ads.yml", "name": "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": ""}, "tags": [], "refs": [["stg_apple_search_ads__search_term_report"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads.yml/not_null_stg_apple_search_ads__search_term_report__fivetran_id.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1671505473.593668, "compiled_code": "\n \n \n\n\n\nselect _fivetran_id\nfrom \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__search_term_report\"\nwhere _fivetran_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "_fivetran_id", "file_key_name": "models.stg_apple_search_ads__search_term_report"}, "test.apple_search_ads_source.not_null_stg_apple_search_ads__search_term_report_date_day.fd93df3302": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('stg_apple_search_ads__search_term_report')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__search_term_report"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "postgres", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads_source", "not_null_stg_apple_search_ads__search_term_report_date_day"], "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__search_term_report_date_day.fd93df3302", "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "not_null_stg_apple_search_ads__search_term_report_date_day.sql", "original_file_path": "models/stg_apple_search_ads.yml", "name": "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": ""}, "tags": [], "refs": [["stg_apple_search_ads__search_term_report"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads.yml/not_null_stg_apple_search_ads__search_term_report_date_day.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1671505473.5946581, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__search_term_report\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "date_day", "file_key_name": "models.stg_apple_search_ads__search_term_report"}, "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__search_term_report__fivetran_id__date_day.aad2a48344": {"test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["_fivetran_id", "date_day"], "model": "{{ get_where_subquery(ref('stg_apple_search_ads__search_term_report')) }}"}, "namespace": "dbt_utils"}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt_utils.test_unique_combination_of_columns", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads_source.stg_apple_search_ads__search_term_report"]}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_4b957c6b8a75dcd1a6055884f71d71c1", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "postgres", "schema": "apple_search_ads_integration_tests_dbt_test__audit", "fqn": ["apple_search_ads_source", "dbt_utils_unique_combination_of_columns_stg_apple_search_ads__search_term_report__fivetran_id__date_day"], "unique_id": "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__search_term_report__fivetran_id__date_day.aad2a48344", "raw_code": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_4b957c6b8a75dcd1a6055884f71d71c1\") }}", "language": "sql", "package_name": "apple_search_ads_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "dbt_utils_unique_combination_o_4b957c6b8a75dcd1a6055884f71d71c1.sql", "original_file_path": "models/stg_apple_search_ads.yml", "name": "dbt_utils_unique_combination_of_columns_stg_apple_search_ads__search_term_report__fivetran_id__date_day", "alias": "dbt_utils_unique_combination_o_4b957c6b8a75dcd1a6055884f71d71c1", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["stg_apple_search_ads__search_term_report"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "compiled_path": "target/compiled/apple_search_ads_source/models/stg_apple_search_ads.yml/dbt_utils_unique_combination_o_4b957c6b8a75dcd1a6055884f71d71c1.sql", "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_4b957c6b8a75dcd1a6055884f71d71c1"}, "created_at": 1671505473.595649, "compiled_code": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n _fivetran_id, date_day\n from \"postgres\".\"apple_search_ads_integration_tests_apple_search_ads_source\".\"stg_apple_search_ads__search_term_report\"\n group by _fivetran_id, date_day\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": null, "file_key_name": "models.stg_apple_search_ads__search_term_report"}}, "sources": {"source.apple_search_ads_source.apple_search_ads.ad_group_history": {"fqn": ["apple_search_ads_source", "apple_search_ads", "ad_group_history"], "database": "postgres", "schema": "apple_search_ads_integration_tests", "unique_id": "source.apple_search_ads_source.apple_search_ads.ad_group_history", "package_name": "apple_search_ads_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "models/src_apple_search_ads.yml", "original_file_path": "models/src_apple_search_ads.yml", "name": "ad_group_history", "source_name": "apple_search_ads", "source_description": "", "loader": "Fivetran", "identifier": "ad_group_history_data", "resource_type": "source", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "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, "quote": null, "tags": []}, "id": {"name": "id", "description": "Ad group ID associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_id": {"name": "campaign_id", "description": "Campaign ID associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "start_time": {"name": "start_time", "description": "Timestamp of designated ad group start time.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "end_time": {"name": "end_time", "description": "The designated ad group end time.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "name": {"name": "name", "description": "Ad group name.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "organization_id": {"name": "organization_id", "description": "Organization ID associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "status": {"name": "status", "description": "The current status of the ad group, values include ENABLED and PAUSED.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {"enabled": true}, "relation_name": "\"postgres\".\"apple_search_ads_integration_tests\".\"ad_group_history_data\"", "created_at": 1671505473.598175}, "source.apple_search_ads_source.apple_search_ads.ad_group_report": {"fqn": ["apple_search_ads_source", "apple_search_ads", "ad_group_report"], "database": "postgres", "schema": "apple_search_ads_integration_tests", "unique_id": "source.apple_search_ads_source.apple_search_ads.ad_group_report", "package_name": "apple_search_ads_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "models/src_apple_search_ads.yml", "original_file_path": "models/src_apple_search_ads.yml", "name": "ad_group_report", "source_name": "apple_search_ads", "source_description": "", "loader": "Fivetran", "identifier": "ad_group_report_data", "resource_type": "source", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "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, "quote": null, "tags": []}, "date": {"name": "date", "description": "Date for daily report aggregation.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "impressions": {"name": "impressions", "description": "Number of times your ad appeared in App Store search results.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "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, "quote": null, "tags": []}, "local_spend_currency": {"name": "local_spend_currency", "description": "This currency value should match the respective organization's currency value.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "new_downloads": {"name": "new_downloads", "description": "App downloads from new users who have never before installed the respective app.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "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.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "taps": {"name": "taps", "description": "The number of times ad was tapped by users within the reporting time period.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {"enabled": true}, "relation_name": "\"postgres\".\"apple_search_ads_integration_tests\".\"ad_group_report_data\"", "created_at": 1671505473.598271}, "source.apple_search_ads_source.apple_search_ads.ad_history": {"fqn": ["apple_search_ads_source", "apple_search_ads", "ad_history"], "database": "postgres", "schema": "apple_search_ads_integration_tests", "unique_id": "source.apple_search_ads_source.apple_search_ads.ad_history", "package_name": "apple_search_ads_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "models/src_apple_search_ads.yml", "original_file_path": "models/src_apple_search_ads.yml", "name": "ad_history", "source_name": "apple_search_ads", "source_description": "", "loader": "Fivetran", "identifier": "ad_history_data", "resource_type": "source", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "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, "quote": null, "tags": []}, "modification_time": {"name": "modification_time", "description": "Timestamp of when the ad object was last modified.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "org_id": {"name": "org_id", "description": "Organization ID associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_id": {"name": "campaign_id", "description": "Campaign ID associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "ad_group_id": {"name": "ad_group_id", "description": "Ad group ID associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "name": {"name": "name", "description": "Ad name associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "id": {"name": "id", "description": "Ad ID associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "status": {"name": "status", "description": "The current status of the ad, values include ENABLED and PAUSED.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {"enabled": true}, "relation_name": "\"postgres\".\"apple_search_ads_integration_tests\".\"ad_history_data\"", "created_at": 1671505473.598351}, "source.apple_search_ads_source.apple_search_ads.ad_level_report": {"fqn": ["apple_search_ads_source", "apple_search_ads", "ad_level_report"], "database": "postgres", "schema": "apple_search_ads_integration_tests", "unique_id": "source.apple_search_ads_source.apple_search_ads.ad_level_report", "package_name": "apple_search_ads_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "models/src_apple_search_ads.yml", "original_file_path": "models/src_apple_search_ads.yml", "name": "ad_level_report", "source_name": "apple_search_ads", "source_description": "", "loader": "Fivetran", "identifier": "ad_report_data", "resource_type": "source", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "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, "quote": null, "tags": []}, "campaign_id": {"name": "campaign_id", "description": "Campaign ID associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "ad_group_id": {"name": "ad_group_id", "description": "Ad group ID associated with the record", "meta": {}, "data_type": null, "quote": null, "tags": []}, "ad_id": {"name": "ad_id", "description": "Ad ID associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "impressions": {"name": "impressions", "description": "Number of times your ad appeared in App Store search results.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "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, "quote": null, "tags": []}, "local_spend_currency": {"name": "local_spend_currency", "description": "This currency value should match the respective organization's currency value.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "new_downloads": {"name": "new_downloads", "description": "App downloads from new users who have never before installed the respective app.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "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.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "taps": {"name": "taps", "description": "The number of times ad was tapped by users within the reporting time period.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {"enabled": true}, "relation_name": "\"postgres\".\"apple_search_ads_integration_tests\".\"ad_report_data\"", "created_at": 1671505473.5984268}, "source.apple_search_ads_source.apple_search_ads.campaign_history": {"fqn": ["apple_search_ads_source", "apple_search_ads", "campaign_history"], "database": "postgres", "schema": "apple_search_ads_integration_tests", "unique_id": "source.apple_search_ads_source.apple_search_ads.campaign_history", "package_name": "apple_search_ads_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "models/src_apple_search_ads.yml", "original_file_path": "models/src_apple_search_ads.yml", "name": "campaign_history", "source_name": "apple_search_ads", "source_description": "", "loader": "Fivetran", "identifier": "campaign_history_data", "resource_type": "source", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "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, "quote": null, "tags": []}, "id": {"name": "id", "description": "Campaign ID associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "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, "quote": null, "tags": []}, "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, "quote": null, "tags": []}, "name": {"name": "name", "description": "Campaign name for the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "organization_id": {"name": "organization_id", "description": "Organization ID associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "status": {"name": "status", "description": "The current status of the campaign, values include ENABLED and PAUSED.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {"enabled": true}, "relation_name": "\"postgres\".\"apple_search_ads_integration_tests\".\"campaign_history_data\"", "created_at": 1671505473.5985}, "source.apple_search_ads_source.apple_search_ads.campaign_report": {"fqn": ["apple_search_ads_source", "apple_search_ads", "campaign_report"], "database": "postgres", "schema": "apple_search_ads_integration_tests", "unique_id": "source.apple_search_ads_source.apple_search_ads.campaign_report", "package_name": "apple_search_ads_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "models/src_apple_search_ads.yml", "original_file_path": "models/src_apple_search_ads.yml", "name": "campaign_report", "source_name": "apple_search_ads", "source_description": "", "loader": "Fivetran", "identifier": "campaign_report_data", "resource_type": "source", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "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, "quote": null, "tags": []}, "date": {"name": "date", "description": "Date for daily report aggregation.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "impressions": {"name": "impressions", "description": "Number of times your ad appeared in App Store search results.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "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, "quote": null, "tags": []}, "local_spend_currency": {"name": "local_spend_currency", "description": "This currency value should match the respective organization's currency value.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "new_downloads": {"name": "new_downloads", "description": "App downloads from new users who have never before installed the respective app.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "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.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "taps": {"name": "taps", "description": "The number of times ad was tapped by users within the reporting time period.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {"enabled": true}, "relation_name": "\"postgres\".\"apple_search_ads_integration_tests\".\"campaign_report_data\"", "created_at": 1671505473.598575}, "source.apple_search_ads_source.apple_search_ads.keyword_history": {"fqn": ["apple_search_ads_source", "apple_search_ads", "keyword_history"], "database": "postgres", "schema": "apple_search_ads_integration_tests", "unique_id": "source.apple_search_ads_source.apple_search_ads.keyword_history", "package_name": "apple_search_ads_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "models/src_apple_search_ads.yml", "original_file_path": "models/src_apple_search_ads.yml", "name": "keyword_history", "source_name": "apple_search_ads", "source_description": "", "loader": "Fivetran", "identifier": "keyword_history_data", "resource_type": "source", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "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, "quote": null, "tags": []}, "id": {"name": "id", "description": "Keyword ID associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_id": {"name": "campaign_id", "description": "Campaign ID associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "ad_group_id": {"name": "ad_group_id", "description": "Ad group ID associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "bid_amount": {"name": "bid_amount", "description": "The bid amount to display your ad for the matching text value.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "bid_currency": {"name": "bid_currency", "description": "This currency value should match the respective organization's currency value.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "match_type": {"name": "match_type", "description": "Controls how ads are matched to user searches; EXACT or BROAD.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "status": {"name": "status", "description": "The current status of the keyword, values include ENABLED and PAUSED.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "text": {"name": "text", "description": "The word or phrase to match in user searches, to show respective ad.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {"enabled": true}, "relation_name": "\"postgres\".\"apple_search_ads_integration_tests\".\"keyword_history_data\"", "created_at": 1671505473.5986502}, "source.apple_search_ads_source.apple_search_ads.keyword_report": {"fqn": ["apple_search_ads_source", "apple_search_ads", "keyword_report"], "database": "postgres", "schema": "apple_search_ads_integration_tests", "unique_id": "source.apple_search_ads_source.apple_search_ads.keyword_report", "package_name": "apple_search_ads_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "models/src_apple_search_ads.yml", "original_file_path": "models/src_apple_search_ads.yml", "name": "keyword_report", "source_name": "apple_search_ads", "source_description": "", "loader": "Fivetran", "identifier": "keyword_report_data", "resource_type": "source", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "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, "quote": null, "tags": []}, "date": {"name": "date", "description": "Date for daily report aggregation.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "impressions": {"name": "impressions", "description": "Number of times your ad appeared in App Store search results.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "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, "quote": null, "tags": []}, "local_spend_currency": {"name": "local_spend_currency", "description": "This currency value should match the respective organization's currency value.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "new_downloads": {"name": "new_downloads", "description": "App downloads from new users who have never before installed the respective app.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "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.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "taps": {"name": "taps", "description": "The number of times ad was tapped by users within the reporting time period.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {"enabled": true}, "relation_name": "\"postgres\".\"apple_search_ads_integration_tests\".\"keyword_report_data\"", "created_at": 1671505473.598722}, "source.apple_search_ads_source.apple_search_ads.organization": {"fqn": ["apple_search_ads_source", "apple_search_ads", "organization"], "database": "postgres", "schema": "apple_search_ads_integration_tests", "unique_id": "source.apple_search_ads_source.apple_search_ads.organization", "package_name": "apple_search_ads_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "models/src_apple_search_ads.yml", "original_file_path": "models/src_apple_search_ads.yml", "name": "organization", "source_name": "apple_search_ads", "source_description": "", "loader": "Fivetran", "identifier": "organization_data", "resource_type": "source", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "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, "quote": null, "tags": []}, "currency": {"name": "currency", "description": "Specified currency for respective organization.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "payment_model": {"name": "payment_model", "description": "Values include 'LOC', 'PAYG' or (payment method hasn't been set).", "meta": {}, "data_type": null, "quote": null, "tags": []}, "organization_name": {"name": "organization_name", "description": "Name of organization.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "time_zone": {"name": "time_zone", "description": "Organization default timezone; values can be ORTZ or UTC.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {"enabled": true}, "relation_name": "\"postgres\".\"apple_search_ads_integration_tests\".\"organization_data\"", "created_at": 1671505473.59879}, "source.apple_search_ads_source.apple_search_ads.search_term_report": {"fqn": ["apple_search_ads_source", "apple_search_ads", "search_term_report"], "database": "postgres", "schema": "apple_search_ads_integration_tests", "unique_id": "source.apple_search_ads_source.apple_search_ads.search_term_report", "package_name": "apple_search_ads_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "models/src_apple_search_ads.yml", "original_file_path": "models/src_apple_search_ads.yml", "name": "search_term_report", "source_name": "apple_search_ads", "source_description": "", "loader": "Fivetran", "identifier": "search_term_report_data", "resource_type": "source", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "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, "quote": null, "tags": []}, "ad_group_id": {"name": "ad_group_id", "description": "Ad group ID associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "campaign_id": {"name": "campaign_id", "description": "Campaign ID associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "date": {"name": "date", "description": "Date for daily report aggregation.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "ad_group_name": {"name": "ad_group_name", "description": "Ad group name.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "bid_amount_amount": {"name": "bid_amount_amount", "description": "The bid amount to display your ad for the matching text value.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "bid_amount_currency": {"name": "bid_amount_currency", "description": "This currency value should match the respective organization's currency value.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "keyword": {"name": "keyword", "description": "The word or phrase to match in user searches, to show respective ad.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "keyword_display_status": {"name": "keyword_display_status", "description": "The keyword display status can either be ACTIVE or PAUSED.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "keyword_id": {"name": "keyword_id", "description": "Keyword ID associated with the record.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "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, "quote": null, "tags": []}, "local_spend_currency": {"name": "local_spend_currency", "description": "This currency value should match the respective organization's currency value.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "match_type": {"name": "match_type", "description": "Controls how ads are matched to user searches; values include EXACT, BROAD or AUTO.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "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, "quote": null, "tags": []}, "search_term_text": {"name": "search_term_text", "description": "The word or phrase to match of user searches.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "impressions": {"name": "impressions", "description": "Number of times your ad appeared in App Store search results.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "taps": {"name": "taps", "description": "The number of times ad was tapped by users within the reporting time period.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "new_downloads": {"name": "new_downloads", "description": "App downloads from new users who have never before installed the respective app.", "meta": {}, "data_type": null, "quote": null, "tags": []}, "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.", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": "True and True"}, "patch_path": null, "unrendered_config": {"enabled": "True and True"}, "relation_name": "\"postgres\".\"apple_search_ads_integration_tests\".\"search_term_report_data\"", "created_at": 1671505473.598874}}, "macros": {"macro.dbt_postgres.postgres__current_timestamp": {"unique_id": "macro.dbt_postgres.postgres__current_timestamp", "package_name": "dbt_postgres", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/postgres", "path": "macros/timestamps.sql", "original_file_path": "macros/timestamps.sql", "name": "postgres__current_timestamp", "macro_sql": "{% macro postgres__current_timestamp() -%}\n now()\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.658321, "supported_languages": null}, "macro.dbt_postgres.postgres__snapshot_string_as_time": {"unique_id": "macro.dbt_postgres.postgres__snapshot_string_as_time", "package_name": "dbt_postgres", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/postgres", "path": "macros/timestamps.sql", "original_file_path": "macros/timestamps.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.6585689, "supported_languages": null}, "macro.dbt_postgres.postgres__snapshot_get_time": {"unique_id": "macro.dbt_postgres.postgres__snapshot_get_time", "package_name": "dbt_postgres", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/postgres", "path": "macros/timestamps.sql", "original_file_path": "macros/timestamps.sql", "name": "postgres__snapshot_get_time", "macro_sql": "{% macro postgres__snapshot_get_time() -%}\n {{ current_timestamp() }}::timestamp without time zone\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.current_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.65868, "supported_languages": null}, "macro.dbt_postgres.postgres__current_timestamp_backcompat": {"unique_id": "macro.dbt_postgres.postgres__current_timestamp_backcompat", "package_name": "dbt_postgres", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/postgres", "path": "macros/timestamps.sql", "original_file_path": "macros/timestamps.sql", "name": "postgres__current_timestamp_backcompat", "macro_sql": "{% macro postgres__current_timestamp_backcompat() %}\n current_timestamp::{{ type_timestamp() }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.type_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.658795, "supported_languages": null}, "macro.dbt_postgres.postgres__current_timestamp_in_utc_backcompat": {"unique_id": "macro.dbt_postgres.postgres__current_timestamp_in_utc_backcompat", "package_name": "dbt_postgres", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/postgres", "path": "macros/timestamps.sql", "original_file_path": "macros/timestamps.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.type_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.658902, "supported_languages": null}, "macro.dbt_postgres.postgres__get_catalog": {"unique_id": "macro.dbt_postgres.postgres__get_catalog", "package_name": "dbt_postgres", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/postgres", "path": "macros/catalog.sql", "original_file_path": "macros/catalog.sql", "name": "postgres__get_catalog", "macro_sql": "{% macro postgres__get_catalog(information_schema, schemas) -%}\n\n {%- call statement('catalog', fetch_result=True) -%}\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 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\n where (\n {%- for schema in schemas -%}\n upper(sch.nspname) = upper('{{ schema }}'){%- 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') -- o[r]dinary table, [v]iew, [f]oreign table, [p]artitioned table. Other values are [i]ndex, [S]equence, [c]omposite type, [t]OAST table, [m]aterialized view\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\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.660067, "supported_languages": null}, "macro.dbt_postgres.postgres_get_relations": {"unique_id": "macro.dbt_postgres.postgres_get_relations", "package_name": "dbt_postgres", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/postgres", "path": "macros/relations.sql", "original_file_path": "macros/relations.sql", "name": "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 with relation as (\n select\n pg_rewrite.ev_class as class,\n pg_rewrite.oid as id\n from pg_rewrite\n ),\n class as (\n select\n oid as id,\n relname as name,\n relnamespace as schema,\n relkind as kind\n from pg_class\n ),\n dependency as (\n select distinct\n pg_depend.objid as id,\n pg_depend.refobjid as ref\n from pg_depend\n ),\n schema as (\n select\n pg_namespace.oid as id,\n pg_namespace.nspname as name\n from pg_namespace\n where nspname != 'information_schema' and nspname not like 'pg\\_%'\n ),\n referenced as (\n select\n relation.id AS id,\n referenced_class.name ,\n referenced_class.schema ,\n referenced_class.kind\n from relation\n join class as referenced_class on relation.class=referenced_class.id\n where referenced_class.kind in ('r', 'v')\n ),\n relationships as (\n select\n referenced.name as referenced_name,\n referenced.schema as referenced_schema_id,\n dependent_class.name as dependent_name,\n dependent_class.schema as dependent_schema_id,\n referenced.kind as kind\n from referenced\n join dependency on referenced.id=dependency.id\n join class as dependent_class on dependency.ref=dependent_class.id\n where\n (referenced.name != dependent_class.name or\n referenced.schema != dependent_class.schema)\n )\n\n select\n referenced_schema.name as referenced_schema,\n relationships.referenced_name as referenced_name,\n dependent_schema.name as dependent_schema,\n relationships.dependent_name as dependent_name\n from relationships\n join schema as dependent_schema on relationships.dependent_schema_id=dependent_schema.id\n join schema as referenced_schema on relationships.referenced_schema_id=referenced_schema.id\n group by referenced_schema, referenced_name, dependent_schema, dependent_name\n order by referenced_schema, referenced_name, dependent_schema, dependent_name;\n\n {%- endcall -%}\n\n {{ return(load_result('relations').table) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.66077, "supported_languages": null}, "macro.dbt_postgres.postgres__create_table_as": {"unique_id": "macro.dbt_postgres.postgres__create_table_as", "package_name": "dbt_postgres", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "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 as (\n {{ sql }}\n );\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.6661701, "supported_languages": null}, "macro.dbt_postgres.postgres__get_create_index_sql": {"unique_id": "macro.dbt_postgres.postgres__get_create_index_sql", "package_name": "dbt_postgres", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.66666, "supported_languages": null}, "macro.dbt_postgres.postgres__create_schema": {"unique_id": "macro.dbt_postgres.postgres__create_schema", "package_name": "dbt_postgres", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.666975, "supported_languages": null}, "macro.dbt_postgres.postgres__drop_schema": {"unique_id": "macro.dbt_postgres.postgres__drop_schema", "package_name": "dbt_postgres", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.667291, "supported_languages": null}, "macro.dbt_postgres.postgres__get_columns_in_relation": {"unique_id": "macro.dbt_postgres.postgres__get_columns_in_relation", "package_name": "dbt_postgres", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement", "macro.dbt.sql_convert_columns_in_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.6677592, "supported_languages": null}, "macro.dbt_postgres.postgres__list_relations_without_caching": {"unique_id": "macro.dbt_postgres.postgres__list_relations_without_caching", "package_name": "dbt_postgres", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "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 {% endcall %}\n {{ return(load_result('list_relations_without_caching').table) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.668129, "supported_languages": null}, "macro.dbt_postgres.postgres__information_schema_name": {"unique_id": "macro.dbt_postgres.postgres__information_schema_name", "package_name": "dbt_postgres", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.668299, "supported_languages": null}, "macro.dbt_postgres.postgres__list_schemas": {"unique_id": "macro.dbt_postgres.postgres__list_schemas", "package_name": "dbt_postgres", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.6686568, "supported_languages": null}, "macro.dbt_postgres.postgres__check_schema_exists": {"unique_id": "macro.dbt_postgres.postgres__check_schema_exists", "package_name": "dbt_postgres", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.6691892, "supported_languages": null}, "macro.dbt_postgres.postgres__make_relation_with_suffix": {"unique_id": "macro.dbt_postgres.postgres__make_relation_with_suffix", "package_name": "dbt_postgres", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.67007, "supported_languages": null}, "macro.dbt_postgres.postgres__make_intermediate_relation": {"unique_id": "macro.dbt_postgres.postgres__make_intermediate_relation", "package_name": "dbt_postgres", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_postgres.postgres__make_relation_with_suffix"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.670273, "supported_languages": null}, "macro.dbt_postgres.postgres__make_temp_relation": {"unique_id": "macro.dbt_postgres.postgres__make_temp_relation", "package_name": "dbt_postgres", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_postgres.postgres__make_relation_with_suffix"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.670588, "supported_languages": null}, "macro.dbt_postgres.postgres__make_backup_relation": {"unique_id": "macro.dbt_postgres.postgres__make_backup_relation", "package_name": "dbt_postgres", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_postgres.postgres__make_relation_with_suffix"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.67086, "supported_languages": null}, "macro.dbt_postgres.postgres_escape_comment": {"unique_id": "macro.dbt_postgres.postgres_escape_comment", "package_name": "dbt_postgres", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.671277, "supported_languages": null}, "macro.dbt_postgres.postgres__alter_relation_comment": {"unique_id": "macro.dbt_postgres.postgres__alter_relation_comment", "package_name": "dbt_postgres", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "postgres__alter_relation_comment", "macro_sql": "{% macro postgres__alter_relation_comment(relation, comment) %}\n {% set escaped_comment = postgres_escape_comment(comment) %}\n comment on {{ relation.type }} {{ relation }} is {{ escaped_comment }};\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_postgres.postgres_escape_comment"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.6715012, "supported_languages": null}, "macro.dbt_postgres.postgres__alter_column_comment": {"unique_id": "macro.dbt_postgres.postgres__alter_column_comment", "package_name": "dbt_postgres", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_postgres.postgres_escape_comment"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.67209, "supported_languages": null}, "macro.dbt_postgres.postgres__get_show_grant_sql": {"unique_id": "macro.dbt_postgres.postgres__get_show_grant_sql", "package_name": "dbt_postgres", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "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", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.672296, "supported_languages": null}, "macro.dbt_postgres.postgres__copy_grants": {"unique_id": "macro.dbt_postgres.postgres__copy_grants", "package_name": "dbt_postgres", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "postgres__copy_grants", "macro_sql": "{% macro postgres__copy_grants() %}\n {{ return(False) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.6724129, "supported_languages": null}, "macro.dbt_postgres.postgres__get_incremental_default_sql": {"unique_id": "macro.dbt_postgres.postgres__get_incremental_default_sql", "package_name": "dbt_postgres", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/postgres", "path": "macros/materializations/incremental_strategies.sql", "original_file_path": "macros/materializations/incremental_strategies.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.get_incremental_delete_insert_sql", "macro.dbt.get_incremental_append_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.672941, "supported_languages": null}, "macro.dbt_postgres.postgres__snapshot_merge_sql": {"unique_id": "macro.dbt_postgres.postgres__snapshot_merge_sql", "package_name": "dbt_postgres", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/postgres", "path": "macros/materializations/snapshot_merge.sql", "original_file_path": "macros/materializations/snapshot_merge.sql", "name": "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 update {{ target }}\n set dbt_valid_to = DBT_INTERNAL_SOURCE.dbt_valid_to\n from {{ source }} as DBT_INTERNAL_SOURCE\n where DBT_INTERNAL_SOURCE.dbt_scd_id::text = {{ target }}.dbt_scd_id::text\n and DBT_INTERNAL_SOURCE.dbt_change_type::text in ('update'::text, 'delete'::text)\n and {{ target }}.dbt_valid_to is null;\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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.673729, "supported_languages": null}, "macro.dbt_postgres.postgres__dateadd": {"unique_id": "macro.dbt_postgres.postgres__dateadd", "package_name": "dbt_postgres", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/postgres", "path": "macros/utils/dateadd.sql", "original_file_path": "macros/utils/dateadd.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.674029, "supported_languages": null}, "macro.dbt_postgres.postgres__listagg": {"unique_id": "macro.dbt_postgres.postgres__listagg", "package_name": "dbt_postgres", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/postgres", "path": "macros/utils/listagg.sql", "original_file_path": "macros/utils/listagg.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.6747048, "supported_languages": null}, "macro.dbt_postgres.postgres__datediff": {"unique_id": "macro.dbt_postgres.postgres__datediff", "package_name": "dbt_postgres", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/postgres", "path": "macros/utils/datediff.sql", "original_file_path": "macros/utils/datediff.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.datediff"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.677981, "supported_languages": null}, "macro.dbt_postgres.postgres__any_value": {"unique_id": "macro.dbt_postgres.postgres__any_value", "package_name": "dbt_postgres", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/postgres", "path": "macros/utils/any_value.sql", "original_file_path": "macros/utils/any_value.sql", "name": "postgres__any_value", "macro_sql": "{% macro postgres__any_value(expression) -%}\n\n min({{ expression }})\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.6782742, "supported_languages": null}, "macro.dbt_postgres.postgres__last_day": {"unique_id": "macro.dbt_postgres.postgres__last_day", "package_name": "dbt_postgres", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/postgres", "path": "macros/utils/last_day.sql", "original_file_path": "macros/utils/last_day.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.dateadd", "macro.dbt.date_trunc", "macro.dbt.default_last_day"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.6789608, "supported_languages": null}, "macro.dbt_postgres.postgres__split_part": {"unique_id": "macro.dbt_postgres.postgres__split_part", "package_name": "dbt_postgres", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/postgres", "path": "macros/utils/split_part.sql", "original_file_path": "macros/utils/split_part.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__split_part", "macro.dbt._split_part_negative"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.679494, "supported_languages": null}, "macro.dbt.run_hooks": {"unique_id": "macro.dbt.run_hooks", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/hooks.sql", "original_file_path": "macros/materializations/hooks.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.680636, "supported_languages": null}, "macro.dbt.make_hook_config": {"unique_id": "macro.dbt.make_hook_config", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/hooks.sql", "original_file_path": "macros/materializations/hooks.sql", "name": "make_hook_config", "macro_sql": "{% macro make_hook_config(sql, inside_transaction) %}\n {{ tojson({\"sql\": sql, \"transaction\": inside_transaction}) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.680834, "supported_languages": null}, "macro.dbt.before_begin": {"unique_id": "macro.dbt.before_begin", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/hooks.sql", "original_file_path": "macros/materializations/hooks.sql", "name": "before_begin", "macro_sql": "{% macro before_begin(sql) %}\n {{ make_hook_config(sql, inside_transaction=False) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.make_hook_config"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.6809769, "supported_languages": null}, "macro.dbt.in_transaction": {"unique_id": "macro.dbt.in_transaction", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/hooks.sql", "original_file_path": "macros/materializations/hooks.sql", "name": "in_transaction", "macro_sql": "{% macro in_transaction(sql) %}\n {{ make_hook_config(sql, inside_transaction=True) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.make_hook_config"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.6811168, "supported_languages": null}, "macro.dbt.after_commit": {"unique_id": "macro.dbt.after_commit", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/hooks.sql", "original_file_path": "macros/materializations/hooks.sql", "name": "after_commit", "macro_sql": "{% macro after_commit(sql) %}\n {{ make_hook_config(sql, inside_transaction=False) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.make_hook_config"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.6812549, "supported_languages": null}, "macro.dbt.set_sql_header": {"unique_id": "macro.dbt.set_sql_header", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/configs.sql", "original_file_path": "macros/materializations/configs.sql", "name": "set_sql_header", "macro_sql": "{% macro set_sql_header(config) -%}\n {{ config.set('sql_header', caller()) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.681707, "supported_languages": null}, "macro.dbt.should_full_refresh": {"unique_id": "macro.dbt.should_full_refresh", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/configs.sql", "original_file_path": "macros/materializations/configs.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.682003, "supported_languages": null}, "macro.dbt.should_store_failures": {"unique_id": "macro.dbt.should_store_failures", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/configs.sql", "original_file_path": "macros/materializations/configs.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.6822999, "supported_languages": null}, "macro.dbt.snapshot_merge_sql": {"unique_id": "macro.dbt.snapshot_merge_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/snapshot_merge.sql", "original_file_path": "macros/materializations/snapshots/snapshot_merge.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_postgres.postgres__snapshot_merge_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.682805, "supported_languages": null}, "macro.dbt.default__snapshot_merge_sql": {"unique_id": "macro.dbt.default__snapshot_merge_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/snapshot_merge.sql", "original_file_path": "macros/materializations/snapshots/snapshot_merge.sql", "name": "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 merge into {{ target }} as DBT_INTERNAL_DEST\n using {{ source }} as DBT_INTERNAL_SOURCE\n on DBT_INTERNAL_SOURCE.dbt_scd_id = DBT_INTERNAL_DEST.dbt_scd_id\n\n when matched\n and DBT_INTERNAL_DEST.dbt_valid_to is null\n and DBT_INTERNAL_SOURCE.dbt_change_type in ('update', 'delete')\n then update\n set dbt_valid_to = DBT_INTERNAL_SOURCE.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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.683071, "supported_languages": null}, "macro.dbt.strategy_dispatch": {"unique_id": "macro.dbt.strategy_dispatch", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.686483, "supported_languages": null}, "macro.dbt.snapshot_hash_arguments": {"unique_id": "macro.dbt.snapshot_hash_arguments", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "name": "snapshot_hash_arguments", "macro_sql": "{% macro snapshot_hash_arguments(args) -%}\n {{ adapter.dispatch('snapshot_hash_arguments', 'dbt')(args) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__snapshot_hash_arguments"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.686655, "supported_languages": null}, "macro.dbt.default__snapshot_hash_arguments": {"unique_id": "macro.dbt.default__snapshot_hash_arguments", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.6868732, "supported_languages": null}, "macro.dbt.snapshot_timestamp_strategy": {"unique_id": "macro.dbt.snapshot_timestamp_strategy", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "name": "snapshot_timestamp_strategy", "macro_sql": "{% macro snapshot_timestamp_strategy(node, snapshotted_rel, current_rel, config, target_exists) %}\n {% set primary_key = config['unique_key'] %}\n {% set updated_at = config['updated_at'] %}\n {% set invalidate_hard_deletes = config.get('invalidate_hard_deletes', false) %}\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 }}.dbt_valid_from < {{ current_rel }}.{{ updated_at }})\n {%- endset %}\n\n {% set scd_id_expr = snapshot_hash_arguments([primary_key, updated_at]) %}\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 }) %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.snapshot_hash_arguments"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.6875782, "supported_languages": null}, "macro.dbt.snapshot_string_as_time": {"unique_id": "macro.dbt.snapshot_string_as_time", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "name": "snapshot_string_as_time", "macro_sql": "{% macro snapshot_string_as_time(timestamp) -%}\n {{ adapter.dispatch('snapshot_string_as_time', 'dbt')(timestamp) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_postgres.postgres__snapshot_string_as_time"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.687742, "supported_languages": null}, "macro.dbt.default__snapshot_string_as_time": {"unique_id": "macro.dbt.default__snapshot_string_as_time", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.687928, "supported_languages": null}, "macro.dbt.snapshot_check_all_get_existing_columns": {"unique_id": "macro.dbt.snapshot_check_all_get_existing_columns", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "name": "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 select {{ check_cols_config | join(', ') }} from ({{ node['compiled_code'] }}) 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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.get_columns_in_query"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.689295, "supported_languages": null}, "macro.dbt.snapshot_check_strategy": {"unique_id": "macro.dbt.snapshot_check_strategy", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "name": "snapshot_check_strategy", "macro_sql": "{% macro snapshot_check_strategy(node, snapshotted_rel, current_rel, config, target_exists) %}\n {% set check_cols_config = config['check_cols'] %}\n {% set primary_key = config['unique_key'] %}\n {% set invalidate_hard_deletes = config.get('invalidate_hard_deletes', false) %}\n {% set updated_at = config.get('updated_at', 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_id_expr = snapshot_hash_arguments([primary_key, updated_at]) %}\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 }) %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "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}, "patch_path": null, "arguments": [], "created_at": 1671505472.690666, "supported_languages": null}, "macro.dbt.create_columns": {"unique_id": "macro.dbt.create_columns", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "name": "create_columns", "macro_sql": "{% macro create_columns(relation, columns) %}\n {{ adapter.dispatch('create_columns', 'dbt')(relation, columns) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__create_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.694481, "supported_languages": null}, "macro.dbt.default__create_columns": {"unique_id": "macro.dbt.default__create_columns", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "name": "default__create_columns", "macro_sql": "{% macro default__create_columns(relation, columns) %}\n {% for column in columns %}\n {% call statement() %}\n alter table {{ relation }} add column \"{{ column.name }}\" {{ column.data_type }};\n {% endcall %}\n {% endfor %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.694766, "supported_languages": null}, "macro.dbt.post_snapshot": {"unique_id": "macro.dbt.post_snapshot", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "name": "post_snapshot", "macro_sql": "{% macro post_snapshot(staging_relation) %}\n {{ adapter.dispatch('post_snapshot', 'dbt')(staging_relation) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__post_snapshot"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.694937, "supported_languages": null}, "macro.dbt.default__post_snapshot": {"unique_id": "macro.dbt.default__post_snapshot", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "name": "default__post_snapshot", "macro_sql": "{% macro default__post_snapshot(staging_relation) %}\n {# no-op #}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.695024, "supported_languages": null}, "macro.dbt.get_true_sql": {"unique_id": "macro.dbt.get_true_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "name": "get_true_sql", "macro_sql": "{% macro get_true_sql() %}\n {{ adapter.dispatch('get_true_sql', 'dbt')() }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__get_true_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.695174, "supported_languages": null}, "macro.dbt.default__get_true_sql": {"unique_id": "macro.dbt.default__get_true_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "name": "default__get_true_sql", "macro_sql": "{% macro default__get_true_sql() %}\n {{ return('TRUE') }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.6952891, "supported_languages": null}, "macro.dbt.snapshot_staging_table": {"unique_id": "macro.dbt.snapshot_staging_table", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__snapshot_staging_table"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.6954901, "supported_languages": null}, "macro.dbt.default__snapshot_staging_table": {"unique_id": "macro.dbt.default__snapshot_staging_table", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "name": "default__snapshot_staging_table", "macro_sql": "{% macro default__snapshot_staging_table(strategy, source_sql, target_relation) -%}\n\n with snapshot_query as (\n\n {{ source_sql }}\n\n ),\n\n snapshotted_data as (\n\n select *,\n {{ strategy.unique_key }} as dbt_unique_key\n\n from {{ target_relation }}\n where dbt_valid_to is null\n\n ),\n\n insertions_source_data as (\n\n select\n *,\n {{ strategy.unique_key }} as dbt_unique_key,\n {{ strategy.updated_at }} as dbt_updated_at,\n {{ strategy.updated_at }} as dbt_valid_from,\n nullif({{ strategy.updated_at }}, {{ strategy.updated_at }}) as dbt_valid_to,\n {{ strategy.scd_id }} as dbt_scd_id\n\n from snapshot_query\n ),\n\n updates_source_data as (\n\n select\n *,\n {{ strategy.unique_key }} as dbt_unique_key,\n {{ strategy.updated_at }} as dbt_updated_at,\n {{ strategy.updated_at }} as dbt_valid_from,\n {{ strategy.updated_at }} as dbt_valid_to\n\n from snapshot_query\n ),\n\n {%- if strategy.invalidate_hard_deletes %}\n\n deletes_source_data as (\n\n select\n *,\n {{ strategy.unique_key }} as dbt_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\n from insertions_source_data as source_data\n left outer join snapshotted_data on snapshotted_data.dbt_unique_key = source_data.dbt_unique_key\n where snapshotted_data.dbt_unique_key is null\n or (\n snapshotted_data.dbt_unique_key is not null\n and (\n {{ strategy.row_changed }}\n )\n )\n\n ),\n\n updates as (\n\n select\n 'update' as dbt_change_type,\n source_data.*,\n snapshotted_data.dbt_scd_id\n\n from updates_source_data as source_data\n join snapshotted_data on snapshotted_data.dbt_unique_key = source_data.dbt_unique_key\n where (\n {{ strategy.row_changed }}\n )\n )\n\n {%- if strategy.invalidate_hard_deletes -%}\n ,\n\n deletes as (\n\n select\n 'delete' as dbt_change_type,\n source_data.*,\n {{ snapshot_get_time() }} as dbt_valid_from,\n {{ snapshot_get_time() }} as dbt_updated_at,\n {{ snapshot_get_time() }} as dbt_valid_to,\n snapshotted_data.dbt_scd_id\n\n from snapshotted_data\n left join deletes_source_data as source_data on snapshotted_data.dbt_unique_key = source_data.dbt_unique_key\n where source_data.dbt_unique_key is null\n )\n {%- endif %}\n\n select * from insertions\n union all\n select * from updates\n {%- if strategy.invalidate_hard_deletes %}\n union all\n select * from deletes\n {%- endif %}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.snapshot_get_time"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.696355, "supported_languages": null}, "macro.dbt.build_snapshot_table": {"unique_id": "macro.dbt.build_snapshot_table", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "name": "build_snapshot_table", "macro_sql": "{% macro build_snapshot_table(strategy, sql) -%}\n {{ adapter.dispatch('build_snapshot_table', 'dbt')(strategy, sql) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__build_snapshot_table"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.6965399, "supported_languages": null}, "macro.dbt.default__build_snapshot_table": {"unique_id": "macro.dbt.default__build_snapshot_table", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "name": "default__build_snapshot_table", "macro_sql": "{% macro default__build_snapshot_table(strategy, sql) %}\n\n select *,\n {{ strategy.scd_id }} as dbt_scd_id,\n {{ strategy.updated_at }} as dbt_updated_at,\n {{ strategy.updated_at }} as dbt_valid_from,\n nullif({{ strategy.updated_at }}, {{ strategy.updated_at }}) as dbt_valid_to\n from (\n {{ sql }}\n ) sbq\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.696785, "supported_languages": null}, "macro.dbt.build_snapshot_staging_table": {"unique_id": "macro.dbt.build_snapshot_staging_table", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "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}, "patch_path": null, "arguments": [], "created_at": 1671505472.697212, "supported_languages": null}, "macro.dbt.materialization_snapshot_default": {"unique_id": "macro.dbt.materialization_snapshot_default", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/snapshot.sql", "original_file_path": "macros/materializations/snapshots/snapshot.sql", "name": "materialization_snapshot_default", "macro_sql": "{% materialization snapshot, default %}\n {%- set config = model['config'] -%}\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 {% set strategy = strategy_macro(model, \"snapshotted_data\", \"source_data\", 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 final_sql = create_table_as(False, target_relation, build_sql) %}\n\n {% else %}\n\n {{ adapter.valid_snapshot_target(target_relation) }}\n\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 missing_columns = adapter.get_missing_columns(staging_table, target_relation)\n | rejectattr('name', 'equalto', 'dbt_change_type')\n | rejectattr('name', 'equalto', 'DBT_CHANGE_TYPE')\n | rejectattr('name', 'equalto', 'dbt_unique_key')\n | rejectattr('name', 'equalto', 'DBT_UNIQUE_KEY')\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', 'equalto', 'dbt_change_type')\n | rejectattr('name', 'equalto', 'DBT_CHANGE_TYPE')\n | rejectattr('name', 'equalto', 'dbt_unique_key')\n | rejectattr('name', 'equalto', 'DBT_UNIQUE_KEY')\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 {% 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 %}", "resource_type": "macro", "tags": [], "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.build_snapshot_staging_table", "macro.dbt.create_columns", "macro.dbt.snapshot_merge_sql", "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}, "patch_path": null, "arguments": [], "created_at": 1671505472.726629, "supported_languages": ["sql"]}, "macro.dbt.materialization_test_default": {"unique_id": "macro.dbt.materialization_test_default", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/tests/test.sql", "original_file_path": "macros/materializations/tests/test.sql", "name": "materialization_test_default", "macro_sql": "{%- materialization test, default -%}\n\n {% set relations = [] %}\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 {% set target_relation = api.Relation.create(\n identifier=identifier, schema=schema, database=database, type='table') -%} %}\n\n {% if old_relation %}\n {% do adapter.drop_relation(old_relation) %}\n {% endif %}\n\n {% call statement(auto_begin=True) %}\n {{ create_table_as(False, target_relation, sql) }}\n {% endcall %}\n\n {% do relations.append(target_relation) %}\n\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 %}\n\n {% endif %}\n\n {% set limit = config.get('limit') %}\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 {{ get_test_sql(main_sql, fail_calc, warn_if, error_if, limit)}}\n\n {%- endcall %}\n\n {{ return({'relations': relations}) }}\n\n{%- endmaterialization -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.should_store_failures", "macro.dbt.statement", "macro.dbt.create_table_as", "macro.dbt.get_test_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.728916, "supported_languages": ["sql"]}, "macro.dbt.get_test_sql": {"unique_id": "macro.dbt.get_test_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/tests/helpers.sql", "original_file_path": "macros/materializations/tests/helpers.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__get_test_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.729455, "supported_languages": null}, "macro.dbt.default__get_test_sql": {"unique_id": "macro.dbt.default__get_test_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/tests/helpers.sql", "original_file_path": "macros/materializations/tests/helpers.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.729763, "supported_languages": null}, "macro.dbt.get_where_subquery": {"unique_id": "macro.dbt.get_where_subquery", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/tests/where_subquery.sql", "original_file_path": "macros/materializations/tests/where_subquery.sql", "name": "get_where_subquery", "macro_sql": "{% macro get_where_subquery(relation) -%}\n {% do return(adapter.dispatch('get_where_subquery', 'dbt')(relation)) %}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__get_where_subquery"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.730211, "supported_languages": null}, "macro.dbt.default__get_where_subquery": {"unique_id": "macro.dbt.default__get_where_subquery", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/tests/where_subquery.sql", "original_file_path": "macros/materializations/tests/where_subquery.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.7305868, "supported_languages": null}, "macro.dbt.get_quoted_csv": {"unique_id": "macro.dbt.get_quoted_csv", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/column_helpers.sql", "original_file_path": "macros/materializations/models/incremental/column_helpers.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.732136, "supported_languages": null}, "macro.dbt.diff_columns": {"unique_id": "macro.dbt.diff_columns", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/column_helpers.sql", "original_file_path": "macros/materializations/models/incremental/column_helpers.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.7326798, "supported_languages": null}, "macro.dbt.diff_column_data_types": {"unique_id": "macro.dbt.diff_column_data_types", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/column_helpers.sql", "original_file_path": "macros/materializations/models/incremental/column_helpers.sql", "name": "diff_column_data_types", "macro_sql": "{% macro diff_column_data_types(source_columns, target_columns) %}\n\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.data_type != tc.data_type and not sc.can_expand_to(other_column=tc) %}\n {{ result.append( { 'column_name': tc.name, 'new_type': sc.data_type } ) }}\n {% endif %}\n {% endif %}\n {% endfor %}\n\n {{ return(result) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.7333481, "supported_languages": null}, "macro.dbt.get_merge_update_columns": {"unique_id": "macro.dbt.get_merge_update_columns", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/column_helpers.sql", "original_file_path": "macros/materializations/models/incremental/column_helpers.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__get_merge_update_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.733582, "supported_languages": null}, "macro.dbt.default__get_merge_update_columns": {"unique_id": "macro.dbt.default__get_merge_update_columns", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/column_helpers.sql", "original_file_path": "macros/materializations/models/incremental/column_helpers.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.734277, "supported_languages": null}, "macro.dbt.get_merge_sql": {"unique_id": "macro.dbt.get_merge_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/merge.sql", "original_file_path": "macros/materializations/models/incremental/merge.sql", "name": "get_merge_sql", "macro_sql": "{% macro get_merge_sql(target, source, unique_key, dest_columns, predicates=none) -%}\n {{ adapter.dispatch('get_merge_sql', 'dbt')(target, source, unique_key, dest_columns, predicates) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__get_merge_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.738507, "supported_languages": null}, "macro.dbt.default__get_merge_sql": {"unique_id": "macro.dbt.default__get_merge_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/merge.sql", "original_file_path": "macros/materializations/models/incremental/merge.sql", "name": "default__get_merge_sql", "macro_sql": "{% macro default__get_merge_sql(target, source, unique_key, dest_columns, predicates) -%}\n {%- set predicates = [] if predicates is none else [] + 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 unique_key_match %}\n DBT_INTERNAL_SOURCE.{{ unique_key }} = DBT_INTERNAL_DEST.{{ unique_key }}\n {% endset %}\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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.get_quoted_csv", "macro.dbt.get_merge_update_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.740128, "supported_languages": null}, "macro.dbt.get_delete_insert_merge_sql": {"unique_id": "macro.dbt.get_delete_insert_merge_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/merge.sql", "original_file_path": "macros/materializations/models/incremental/merge.sql", "name": "get_delete_insert_merge_sql", "macro_sql": "{% macro get_delete_insert_merge_sql(target, source, unique_key, dest_columns) -%}\n {{ adapter.dispatch('get_delete_insert_merge_sql', 'dbt')(target, source, unique_key, dest_columns) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__get_delete_insert_merge_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.740376, "supported_languages": null}, "macro.dbt.default__get_delete_insert_merge_sql": {"unique_id": "macro.dbt.default__get_delete_insert_merge_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/merge.sql", "original_file_path": "macros/materializations/models/incremental/merge.sql", "name": "default__get_delete_insert_merge_sql", "macro_sql": "{% macro default__get_delete_insert_merge_sql(target, source, unique_key, dest_columns) -%}\n\n {%- set dest_cols_csv = get_quoted_csv(dest_columns | map(attribute=\"name\")) -%}\n\n {% if unique_key %}\n {% if unique_key is sequence and unique_key is not string %}\n delete from {{target }}\n using {{ source }}\n where (\n {% for key in unique_key %}\n {{ source }}.{{ key }} = {{ target }}.{{ key }}\n {{ \"and \" if not loop.last }}\n {% endfor %}\n );\n {% else %}\n delete from {{ target }}\n where (\n {{ unique_key }}) in (\n select ({{ unique_key }})\n from {{ source }}\n );\n\n {% endif %}\n {% endif %}\n\n insert into {{ target }} ({{ dest_cols_csv }})\n (\n select {{ dest_cols_csv }}\n from {{ source }}\n )\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.get_quoted_csv"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.741112, "supported_languages": null}, "macro.dbt.get_insert_overwrite_merge_sql": {"unique_id": "macro.dbt.get_insert_overwrite_merge_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/merge.sql", "original_file_path": "macros/materializations/models/incremental/merge.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__get_insert_overwrite_merge_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.741377, "supported_languages": null}, "macro.dbt.default__get_insert_overwrite_merge_sql": {"unique_id": "macro.dbt.default__get_insert_overwrite_merge_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/merge.sql", "original_file_path": "macros/materializations/models/incremental/merge.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.get_quoted_csv"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.742014, "supported_languages": null}, "macro.dbt.is_incremental": {"unique_id": "macro.dbt.is_incremental", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/is_incremental.sql", "original_file_path": "macros/materializations/models/incremental/is_incremental.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.should_full_refresh"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.742715, "supported_languages": null}, "macro.dbt.get_incremental_append_sql": {"unique_id": "macro.dbt.get_incremental_append_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/strategies.sql", "original_file_path": "macros/materializations/models/incremental/strategies.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__get_incremental_append_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.743627, "supported_languages": null}, "macro.dbt.default__get_incremental_append_sql": {"unique_id": "macro.dbt.default__get_incremental_append_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/strategies.sql", "original_file_path": "macros/materializations/models/incremental/strategies.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.get_insert_into_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.743863, "supported_languages": null}, "macro.dbt.get_incremental_delete_insert_sql": {"unique_id": "macro.dbt.get_incremental_delete_insert_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/strategies.sql", "original_file_path": "macros/materializations/models/incremental/strategies.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__get_incremental_delete_insert_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.7440472, "supported_languages": null}, "macro.dbt.default__get_incremental_delete_insert_sql": {"unique_id": "macro.dbt.default__get_incremental_delete_insert_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/strategies.sql", "original_file_path": "macros/materializations/models/incremental/strategies.sql", "name": "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\"])) %}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.get_delete_insert_merge_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.744303, "supported_languages": null}, "macro.dbt.get_incremental_merge_sql": {"unique_id": "macro.dbt.get_incremental_merge_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/strategies.sql", "original_file_path": "macros/materializations/models/incremental/strategies.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__get_incremental_merge_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.7444851, "supported_languages": null}, "macro.dbt.default__get_incremental_merge_sql": {"unique_id": "macro.dbt.default__get_incremental_merge_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/strategies.sql", "original_file_path": "macros/materializations/models/incremental/strategies.sql", "name": "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\"])) %}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.get_merge_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.7447412, "supported_languages": null}, "macro.dbt.get_incremental_insert_overwrite_sql": {"unique_id": "macro.dbt.get_incremental_insert_overwrite_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/strategies.sql", "original_file_path": "macros/materializations/models/incremental/strategies.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__get_incremental_insert_overwrite_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.744928, "supported_languages": null}, "macro.dbt.default__get_incremental_insert_overwrite_sql": {"unique_id": "macro.dbt.default__get_incremental_insert_overwrite_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/strategies.sql", "original_file_path": "macros/materializations/models/incremental/strategies.sql", "name": "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[\"predicates\"])) %}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.get_insert_overwrite_merge_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.745197, "supported_languages": null}, "macro.dbt.get_incremental_default_sql": {"unique_id": "macro.dbt.get_incremental_default_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/strategies.sql", "original_file_path": "macros/materializations/models/incremental/strategies.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_postgres.postgres__get_incremental_default_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.745388, "supported_languages": null}, "macro.dbt.default__get_incremental_default_sql": {"unique_id": "macro.dbt.default__get_incremental_default_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/strategies.sql", "original_file_path": "macros/materializations/models/incremental/strategies.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.get_incremental_append_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.745536, "supported_languages": null}, "macro.dbt.get_insert_into_sql": {"unique_id": "macro.dbt.get_insert_into_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/strategies.sql", "original_file_path": "macros/materializations/models/incremental/strategies.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.get_quoted_csv"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.745812, "supported_languages": null}, "macro.dbt.materialization_incremental_default": {"unique_id": "macro.dbt.materialization_incremental_default", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/incremental.sql", "original_file_path": "macros/materializations/models/incremental/incremental.sql", "name": "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 {% if existing_relation is none %}\n {% set build_sql = get_create_table_as_sql(False, target_relation, sql) %}\n {% elif full_refresh_mode %}\n {% set build_sql = get_create_table_as_sql(False, intermediate_relation, sql) %}\n {% set need_swap = true %}\n {% else %}\n {% do run_query(get_create_table_as_sql(True, temp_relation, sql)) %}\n {% do adapter.expand_target_column_types(\n from_relation=temp_relation,\n to_relation=target_relation) %}\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_strategy = config.get('incremental_strategy') or 'default' %}\n {% set incremental_predicates = config.get('incremental_predicates', none) %}\n {% set strategy_sql_macro_func = adapter.get_incremental_strategy_macro(context, incremental_strategy) %}\n {% set strategy_arg_dict = ({'target_relation': target_relation, 'temp_relation': temp_relation, 'unique_key': unique_key, 'dest_columns': dest_columns, '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 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 {% if existing_relation is none or existing_relation.is_view or should_full_refresh() %}\n {% do create_indexes(target_relation) %}\n {% endif %}\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 %}", "resource_type": "macro", "tags": [], "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.should_revoke", "macro.dbt.apply_grants", "macro.dbt.persist_docs", "macro.dbt.create_indexes"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.7506502, "supported_languages": ["sql"]}, "macro.dbt.incremental_validate_on_schema_change": {"unique_id": "macro.dbt.incremental_validate_on_schema_change", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/on_schema_change.sql", "original_file_path": "macros/materializations/models/incremental/on_schema_change.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.7558022, "supported_languages": null}, "macro.dbt.check_for_schema_changes": {"unique_id": "macro.dbt.check_for_schema_changes", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/on_schema_change.sql", "original_file_path": "macros/materializations/models/incremental/on_schema_change.sql", "name": "check_for_schema_changes", "macro_sql": "{% macro 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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.diff_columns", "macro.dbt.diff_column_data_types"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.757011, "supported_languages": null}, "macro.dbt.sync_column_schemas": {"unique_id": "macro.dbt.sync_column_schemas", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/on_schema_change.sql", "original_file_path": "macros/materializations/models/incremental/on_schema_change.sql", "name": "sync_column_schemas", "macro_sql": "{% macro 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\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 {%- 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 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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.alter_relation_add_remove_columns", "macro.dbt.alter_column_type"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.758191, "supported_languages": null}, "macro.dbt.process_schema_changes": {"unique_id": "macro.dbt.process_schema_changes", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/on_schema_change.sql", "original_file_path": "macros/materializations/models/incremental/on_schema_change.sql", "name": "process_schema_changes", "macro_sql": "{% macro 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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.check_for_schema_changes", "macro.dbt.sync_column_schemas"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.759042, "supported_languages": null}, "macro.dbt.materialization_table_default": {"unique_id": "macro.dbt.materialization_table_default", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/table/table.sql", "original_file_path": "macros/materializations/models/table/table.sql", "name": "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 -- cleanup\n {% if existing_relation is not none %}\n {{ adapter.rename_relation(existing_relation, backup_relation) }}\n {% endif %}\n\n {{ adapter.rename_relation(intermediate_relation, target_relation) }}\n\n {% do create_indexes(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 %}", "resource_type": "macro", "tags": [], "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}, "patch_path": null, "arguments": [], "created_at": 1671505472.761678, "supported_languages": ["sql"]}, "macro.dbt.get_create_table_as_sql": {"unique_id": "macro.dbt.get_create_table_as_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/table/create_table_as.sql", "original_file_path": "macros/materializations/models/table/create_table_as.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__get_create_table_as_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.762259, "supported_languages": null}, "macro.dbt.default__get_create_table_as_sql": {"unique_id": "macro.dbt.default__get_create_table_as_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/table/create_table_as.sql", "original_file_path": "macros/materializations/models/table/create_table_as.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.create_table_as"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.7624478, "supported_languages": null}, "macro.dbt.create_table_as": {"unique_id": "macro.dbt.create_table_as", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/table/create_table_as.sql", "original_file_path": "macros/materializations/models/table/create_table_as.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_postgres.postgres__create_table_as"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.762878, "supported_languages": null}, "macro.dbt.default__create_table_as": {"unique_id": "macro.dbt.default__create_table_as", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/table/create_table_as.sql", "original_file_path": "macros/materializations/models/table/create_table_as.sql", "name": "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 as (\n {{ sql }}\n );\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.7632902, "supported_languages": null}, "macro.dbt.materialization_view_default": {"unique_id": "macro.dbt.materialization_view_default", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/view/view.sql", "original_file_path": "macros/materializations/models/view/view.sql", "name": "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 {{ adapter.rename_relation(existing_relation, backup_relation) }}\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 -%}", "resource_type": "macro", "tags": [], "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}, "patch_path": null, "arguments": [], "created_at": 1671505472.765886, "supported_languages": ["sql"]}, "macro.dbt.handle_existing_table": {"unique_id": "macro.dbt.handle_existing_table", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/view/helpers.sql", "original_file_path": "macros/materializations/models/view/helpers.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__handle_existing_table"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.766304, "supported_languages": null}, "macro.dbt.default__handle_existing_table": {"unique_id": "macro.dbt.default__handle_existing_table", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/view/helpers.sql", "original_file_path": "macros/materializations/models/view/helpers.sql", "name": "default__handle_existing_table", "macro_sql": "{% macro default__handle_existing_table(full_refresh, old_relation) %}\n {{ log(\"Dropping relation \" ~ old_relation ~ \" because it is of type \" ~ old_relation.type) }}\n {{ adapter.drop_relation(old_relation) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.7665339, "supported_languages": null}, "macro.dbt.create_or_replace_view": {"unique_id": "macro.dbt.create_or_replace_view", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/view/create_or_replace_view.sql", "original_file_path": "macros/materializations/models/view/create_or_replace_view.sql", "name": "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=True) %}\n\n {{ run_hooks(post_hooks) }}\n\n {{ return({'relations': [target_relation]}) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "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}, "patch_path": null, "arguments": [], "created_at": 1671505472.768091, "supported_languages": null}, "macro.dbt.get_create_view_as_sql": {"unique_id": "macro.dbt.get_create_view_as_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/view/create_view_as.sql", "original_file_path": "macros/materializations/models/view/create_view_as.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__get_create_view_as_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.768548, "supported_languages": null}, "macro.dbt.default__get_create_view_as_sql": {"unique_id": "macro.dbt.default__get_create_view_as_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/view/create_view_as.sql", "original_file_path": "macros/materializations/models/view/create_view_as.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.create_view_as"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.768725, "supported_languages": null}, "macro.dbt.create_view_as": {"unique_id": "macro.dbt.create_view_as", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/view/create_view_as.sql", "original_file_path": "macros/materializations/models/view/create_view_as.sql", "name": "create_view_as", "macro_sql": "{% macro create_view_as(relation, sql) -%}\n {{ adapter.dispatch('create_view_as', 'dbt')(relation, sql) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__create_view_as"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.768908, "supported_languages": null}, "macro.dbt.default__create_view_as": {"unique_id": "macro.dbt.default__create_view_as", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/models/view/create_view_as.sql", "original_file_path": "macros/materializations/models/view/create_view_as.sql", "name": "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 }} as (\n {{ sql }}\n );\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.769166, "supported_languages": null}, "macro.dbt.materialization_seed_default": {"unique_id": "macro.dbt.materialization_seed_default", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/seeds/seed.sql", "original_file_path": "macros/materializations/seeds/seed.sql", "name": "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 comparision 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)) }}\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 = load_csv_rows(model, agate_table) %}\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 %}", "resource_type": "macro", "tags": [], "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}, "patch_path": null, "arguments": [], "created_at": 1671505472.772436, "supported_languages": ["sql"]}, "macro.dbt.create_csv_table": {"unique_id": "macro.dbt.create_csv_table", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "name": "create_csv_table", "macro_sql": "{% macro create_csv_table(model, agate_table) -%}\n {{ adapter.dispatch('create_csv_table', 'dbt')(model, agate_table) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__create_csv_table"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.7770472, "supported_languages": null}, "macro.dbt.default__create_csv_table": {"unique_id": "macro.dbt.default__create_csv_table", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.777935, "supported_languages": null}, "macro.dbt.reset_csv_table": {"unique_id": "macro.dbt.reset_csv_table", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__reset_csv_table"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.778167, "supported_languages": null}, "macro.dbt.default__reset_csv_table": {"unique_id": "macro.dbt.default__reset_csv_table", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "name": "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 %}\n {% endif %}\n\n {{ return(sql) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.create_csv_table"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.778641, "supported_languages": null}, "macro.dbt.get_csv_sql": {"unique_id": "macro.dbt.get_csv_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__get_csv_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.778831, "supported_languages": null}, "macro.dbt.default__get_csv_sql": {"unique_id": "macro.dbt.default__get_csv_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.77896, "supported_languages": null}, "macro.dbt.get_binding_char": {"unique_id": "macro.dbt.get_binding_char", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "name": "get_binding_char", "macro_sql": "{% macro get_binding_char() -%}\n {{ adapter.dispatch('get_binding_char', 'dbt')() }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__get_binding_char"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.779098, "supported_languages": null}, "macro.dbt.default__get_binding_char": {"unique_id": "macro.dbt.default__get_binding_char", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "name": "default__get_binding_char", "macro_sql": "{% macro default__get_binding_char() %}\n {{ return('%s') }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.779211, "supported_languages": null}, "macro.dbt.get_batch_size": {"unique_id": "macro.dbt.get_batch_size", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "name": "get_batch_size", "macro_sql": "{% macro get_batch_size() -%}\n {{ return(adapter.dispatch('get_batch_size', 'dbt')()) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__get_batch_size"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.77937, "supported_languages": null}, "macro.dbt.default__get_batch_size": {"unique_id": "macro.dbt.default__get_batch_size", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "name": "default__get_batch_size", "macro_sql": "{% macro default__get_batch_size() %}\n {{ return(10000) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.779486, "supported_languages": null}, "macro.dbt.get_seed_column_quoted_csv": {"unique_id": "macro.dbt.get_seed_column_quoted_csv", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.7799559, "supported_languages": null}, "macro.dbt.load_csv_rows": {"unique_id": "macro.dbt.load_csv_rows", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "name": "load_csv_rows", "macro_sql": "{% macro load_csv_rows(model, agate_table) -%}\n {{ adapter.dispatch('load_csv_rows', 'dbt')(model, agate_table) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__load_csv_rows"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.78014, "supported_languages": null}, "macro.dbt.default__load_csv_rows": {"unique_id": "macro.dbt.default__load_csv_rows", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "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}, "patch_path": null, "arguments": [], "created_at": 1671505472.7814279, "supported_languages": null}, "macro.dbt.generate_alias_name": {"unique_id": "macro.dbt.generate_alias_name", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/get_custom_name/get_custom_alias.sql", "original_file_path": "macros/get_custom_name/get_custom_alias.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__generate_alias_name"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.781919, "supported_languages": null}, "macro.dbt.default__generate_alias_name": {"unique_id": "macro.dbt.default__generate_alias_name", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/get_custom_name/get_custom_alias.sql", "original_file_path": "macros/get_custom_name/get_custom_alias.sql", "name": "default__generate_alias_name", "macro_sql": "{% macro default__generate_alias_name(custom_alias_name=none, node=none) -%}\n\n {%- if custom_alias_name is none -%}\n\n {{ node.name }}\n\n {%- else -%}\n\n {{ custom_alias_name | trim }}\n\n {%- endif -%}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.7821472, "supported_languages": null}, "macro.dbt.generate_schema_name": {"unique_id": "macro.dbt.generate_schema_name", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/get_custom_name/get_custom_schema.sql", "original_file_path": "macros/get_custom_name/get_custom_schema.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__generate_schema_name"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.782732, "supported_languages": null}, "macro.dbt.default__generate_schema_name": {"unique_id": "macro.dbt.default__generate_schema_name", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/get_custom_name/get_custom_schema.sql", "original_file_path": "macros/get_custom_name/get_custom_schema.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.782992, "supported_languages": null}, "macro.dbt.generate_schema_name_for_env": {"unique_id": "macro.dbt.generate_schema_name_for_env", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/get_custom_name/get_custom_schema.sql", "original_file_path": "macros/get_custom_name/get_custom_schema.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.7832818, "supported_languages": null}, "macro.dbt.generate_database_name": {"unique_id": "macro.dbt.generate_database_name", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/get_custom_name/get_custom_database.sql", "original_file_path": "macros/get_custom_name/get_custom_database.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__generate_database_name"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.783745, "supported_languages": null}, "macro.dbt.default__generate_database_name": {"unique_id": "macro.dbt.default__generate_database_name", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/get_custom_name/get_custom_database.sql", "original_file_path": "macros/get_custom_name/get_custom_database.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.7839959, "supported_languages": null}, "macro.dbt.default__test_relationships": {"unique_id": "macro.dbt.default__test_relationships", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/generic_test_sql/relationships.sql", "original_file_path": "macros/generic_test_sql/relationships.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.784412, "supported_languages": null}, "macro.dbt.default__test_not_null": {"unique_id": "macro.dbt.default__test_not_null", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/generic_test_sql/not_null.sql", "original_file_path": "macros/generic_test_sql/not_null.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.should_store_failures"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.784787, "supported_languages": null}, "macro.dbt.default__test_unique": {"unique_id": "macro.dbt.default__test_unique", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/generic_test_sql/unique.sql", "original_file_path": "macros/generic_test_sql/unique.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.785103, "supported_languages": null}, "macro.dbt.default__test_accepted_values": {"unique_id": "macro.dbt.default__test_accepted_values", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/generic_test_sql/accepted_values.sql", "original_file_path": "macros/generic_test_sql/accepted_values.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.7857401, "supported_languages": null}, "macro.dbt.statement": {"unique_id": "macro.dbt.statement", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/etc/statement.sql", "original_file_path": "macros/etc/statement.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.7872992, "supported_languages": null}, "macro.dbt.noop_statement": {"unique_id": "macro.dbt.noop_statement", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/etc/statement.sql", "original_file_path": "macros/etc/statement.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.787957, "supported_languages": null}, "macro.dbt.run_query": {"unique_id": "macro.dbt.run_query", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/etc/statement.sql", "original_file_path": "macros/etc/statement.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.7882502, "supported_languages": null}, "macro.dbt.convert_datetime": {"unique_id": "macro.dbt.convert_datetime", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/etc/datetime.sql", "original_file_path": "macros/etc/datetime.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.7900522, "supported_languages": null}, "macro.dbt.dates_in_range": {"unique_id": "macro.dbt.dates_in_range", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/etc/datetime.sql", "original_file_path": "macros/etc/datetime.sql", "name": "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 Partiton 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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.convert_datetime"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.7912672, "supported_languages": null}, "macro.dbt.partition_range": {"unique_id": "macro.dbt.partition_range", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/etc/datetime.sql", "original_file_path": "macros/etc/datetime.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.dates_in_range"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.792023, "supported_languages": null}, "macro.dbt.py_current_timestring": {"unique_id": "macro.dbt.py_current_timestring", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/etc/datetime.sql", "original_file_path": "macros/etc/datetime.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.792256, "supported_languages": null}, "macro.dbt.except": {"unique_id": "macro.dbt.except", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/utils/except.sql", "original_file_path": "macros/utils/except.sql", "name": "except", "macro_sql": "{% macro except() %}\n {{ return(adapter.dispatch('except', 'dbt')()) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__except"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.792599, "supported_languages": null}, "macro.dbt.default__except": {"unique_id": "macro.dbt.default__except", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/utils/except.sql", "original_file_path": "macros/utils/except.sql", "name": "default__except", "macro_sql": "{% macro default__except() %}\n\n except\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.7926762, "supported_languages": null}, "macro.dbt.replace": {"unique_id": "macro.dbt.replace", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/utils/replace.sql", "original_file_path": "macros/utils/replace.sql", "name": "replace", "macro_sql": "{% macro replace(field, old_chars, new_chars) -%}\n {{ return(adapter.dispatch('replace', 'dbt') (field, old_chars, new_chars)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__replace"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.7930849, "supported_languages": null}, "macro.dbt.default__replace": {"unique_id": "macro.dbt.default__replace", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/utils/replace.sql", "original_file_path": "macros/utils/replace.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.793261, "supported_languages": null}, "macro.dbt.concat": {"unique_id": "macro.dbt.concat", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/utils/concat.sql", "original_file_path": "macros/utils/concat.sql", "name": "concat", "macro_sql": "{% macro concat(fields) -%}\n {{ return(adapter.dispatch('concat', 'dbt')(fields)) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__concat"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.7935832, "supported_languages": null}, "macro.dbt.default__concat": {"unique_id": "macro.dbt.default__concat", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/utils/concat.sql", "original_file_path": "macros/utils/concat.sql", "name": "default__concat", "macro_sql": "{% macro default__concat(fields) -%}\n {{ fields|join(' || ') }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.793705, "supported_languages": null}, "macro.dbt.length": {"unique_id": "macro.dbt.length", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/utils/length.sql", "original_file_path": "macros/utils/length.sql", "name": "length", "macro_sql": "{% macro length(expression) -%}\n {{ return(adapter.dispatch('length', 'dbt') (expression)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__length"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.7940211, "supported_languages": null}, "macro.dbt.default__length": {"unique_id": "macro.dbt.default__length", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/utils/length.sql", "original_file_path": "macros/utils/length.sql", "name": "default__length", "macro_sql": "{% macro default__length(expression) %}\n\n length(\n {{ expression }}\n )\n\n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.7941241, "supported_languages": null}, "macro.dbt.dateadd": {"unique_id": "macro.dbt.dateadd", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/utils/dateadd.sql", "original_file_path": "macros/utils/dateadd.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_postgres.postgres__dateadd"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.794525, "supported_languages": null}, "macro.dbt.default__dateadd": {"unique_id": "macro.dbt.default__dateadd", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/utils/dateadd.sql", "original_file_path": "macros/utils/dateadd.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.7946858, "supported_languages": null}, "macro.dbt.intersect": {"unique_id": "macro.dbt.intersect", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/utils/intersect.sql", "original_file_path": "macros/utils/intersect.sql", "name": "intersect", "macro_sql": "{% macro intersect() %}\n {{ return(adapter.dispatch('intersect', 'dbt')()) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__intersect"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.7949781, "supported_languages": null}, "macro.dbt.default__intersect": {"unique_id": "macro.dbt.default__intersect", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/utils/intersect.sql", "original_file_path": "macros/utils/intersect.sql", "name": "default__intersect", "macro_sql": "{% macro default__intersect() %}\n\n intersect\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.7950552, "supported_languages": null}, "macro.dbt.escape_single_quotes": {"unique_id": "macro.dbt.escape_single_quotes", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/utils/escape_single_quotes.sql", "original_file_path": "macros/utils/escape_single_quotes.sql", "name": "escape_single_quotes", "macro_sql": "{% macro escape_single_quotes(expression) %}\n {{ return(adapter.dispatch('escape_single_quotes', 'dbt') (expression)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__escape_single_quotes"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.7953851, "supported_languages": null}, "macro.dbt.default__escape_single_quotes": {"unique_id": "macro.dbt.default__escape_single_quotes", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/utils/escape_single_quotes.sql", "original_file_path": "macros/utils/escape_single_quotes.sql", "name": "default__escape_single_quotes", "macro_sql": "{% macro default__escape_single_quotes(expression) -%}\n{{ expression | replace(\"'\",\"''\") }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.795527, "supported_languages": null}, "macro.dbt.right": {"unique_id": "macro.dbt.right", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/utils/right.sql", "original_file_path": "macros/utils/right.sql", "name": "right", "macro_sql": "{% macro right(string_text, length_expression) -%}\n {{ return(adapter.dispatch('right', 'dbt') (string_text, length_expression)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__right"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.7958899, "supported_languages": null}, "macro.dbt.default__right": {"unique_id": "macro.dbt.default__right", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/utils/right.sql", "original_file_path": "macros/utils/right.sql", "name": "default__right", "macro_sql": "{% macro default__right(string_text, length_expression) %}\n\n right(\n {{ string_text }},\n {{ length_expression }}\n )\n\n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.7960992, "supported_languages": null}, "macro.dbt.listagg": {"unique_id": "macro.dbt.listagg", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/utils/listagg.sql", "original_file_path": "macros/utils/listagg.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_postgres.postgres__listagg"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.796767, "supported_languages": null}, "macro.dbt.default__listagg": {"unique_id": "macro.dbt.default__listagg", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/utils/listagg.sql", "original_file_path": "macros/utils/listagg.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.7971709, "supported_languages": null}, "macro.dbt.datediff": {"unique_id": "macro.dbt.datediff", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/utils/datediff.sql", "original_file_path": "macros/utils/datediff.sql", "name": "datediff", "macro_sql": "{% macro datediff(first_date, second_date, datepart) %}\n {{ return(adapter.dispatch('datediff', 'dbt')(first_date, second_date, datepart)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_postgres.postgres__datediff"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.7975721, "supported_languages": null}, "macro.dbt.default__datediff": {"unique_id": "macro.dbt.default__datediff", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/utils/datediff.sql", "original_file_path": "macros/utils/datediff.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.797735, "supported_languages": null}, "macro.dbt.safe_cast": {"unique_id": "macro.dbt.safe_cast", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/utils/safe_cast.sql", "original_file_path": "macros/utils/safe_cast.sql", "name": "safe_cast", "macro_sql": "{% macro safe_cast(field, type) %}\n {{ return(adapter.dispatch('safe_cast', 'dbt') (field, type)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__safe_cast"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.798084, "supported_languages": null}, "macro.dbt.default__safe_cast": {"unique_id": "macro.dbt.default__safe_cast", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/utils/safe_cast.sql", "original_file_path": "macros/utils/safe_cast.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.7982268, "supported_languages": null}, "macro.dbt.hash": {"unique_id": "macro.dbt.hash", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/utils/hash.sql", "original_file_path": "macros/utils/hash.sql", "name": "hash", "macro_sql": "{% macro hash(field) -%}\n {{ return(adapter.dispatch('hash', 'dbt') (field)) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__hash"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.798548, "supported_languages": null}, "macro.dbt.default__hash": {"unique_id": "macro.dbt.default__hash", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/utils/hash.sql", "original_file_path": "macros/utils/hash.sql", "name": "default__hash", "macro_sql": "{% macro default__hash(field) -%}\n md5(cast({{ field }} as {{ api.Column.translate_type('string') }}))\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.7987041, "supported_languages": null}, "macro.dbt.cast_bool_to_text": {"unique_id": "macro.dbt.cast_bool_to_text", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/utils/cast_bool_to_text.sql", "original_file_path": "macros/utils/cast_bool_to_text.sql", "name": "cast_bool_to_text", "macro_sql": "{% macro cast_bool_to_text(field) %}\n {{ adapter.dispatch('cast_bool_to_text', 'dbt') (field) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__cast_bool_to_text"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.79901, "supported_languages": null}, "macro.dbt.default__cast_bool_to_text": {"unique_id": "macro.dbt.default__cast_bool_to_text", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/utils/cast_bool_to_text.sql", "original_file_path": "macros/utils/cast_bool_to_text.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.799169, "supported_languages": null}, "macro.dbt.any_value": {"unique_id": "macro.dbt.any_value", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/utils/any_value.sql", "original_file_path": "macros/utils/any_value.sql", "name": "any_value", "macro_sql": "{% macro any_value(expression) -%}\n {{ return(adapter.dispatch('any_value', 'dbt') (expression)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_postgres.postgres__any_value"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.799478, "supported_languages": null}, "macro.dbt.default__any_value": {"unique_id": "macro.dbt.default__any_value", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/utils/any_value.sql", "original_file_path": "macros/utils/any_value.sql", "name": "default__any_value", "macro_sql": "{% macro default__any_value(expression) -%}\n\n any_value({{ expression }})\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.7995808, "supported_languages": null}, "macro.dbt.position": {"unique_id": "macro.dbt.position", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/utils/position.sql", "original_file_path": "macros/utils/position.sql", "name": "position", "macro_sql": "{% macro position(substring_text, string_text) -%}\n {{ return(adapter.dispatch('position', 'dbt') (substring_text, string_text)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__position"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.79994, "supported_languages": null}, "macro.dbt.default__position": {"unique_id": "macro.dbt.default__position", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/utils/position.sql", "original_file_path": "macros/utils/position.sql", "name": "default__position", "macro_sql": "{% macro default__position(substring_text, string_text) %}\n\n position(\n {{ substring_text }} in {{ string_text }}\n )\n\n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.8000698, "supported_languages": null}, "macro.dbt.string_literal": {"unique_id": "macro.dbt.string_literal", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/utils/literal.sql", "original_file_path": "macros/utils/literal.sql", "name": "string_literal", "macro_sql": "{%- macro string_literal(value) -%}\n {{ return(adapter.dispatch('string_literal', 'dbt') (value)) }}\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__string_literal"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.800381, "supported_languages": null}, "macro.dbt.default__string_literal": {"unique_id": "macro.dbt.default__string_literal", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/utils/literal.sql", "original_file_path": "macros/utils/literal.sql", "name": "default__string_literal", "macro_sql": "{% macro default__string_literal(value) -%}\n '{{ value }}'\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.800481, "supported_languages": null}, "macro.dbt.type_string": {"unique_id": "macro.dbt.type_string", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "name": "type_string", "macro_sql": "\n\n{%- macro type_string() -%}\n {{ return(adapter.dispatch('type_string', 'dbt')()) }}\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.801435, "supported_languages": null}, "macro.dbt.default__type_string": {"unique_id": "macro.dbt.default__type_string", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "name": "default__type_string", "macro_sql": "{% macro default__type_string() %}\n {{ return(api.Column.translate_type(\"string\")) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.801582, "supported_languages": null}, "macro.dbt.type_timestamp": {"unique_id": "macro.dbt.type_timestamp", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "name": "type_timestamp", "macro_sql": "\n\n{%- macro type_timestamp() -%}\n {{ return(adapter.dispatch('type_timestamp', 'dbt')()) }}\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__type_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.80181, "supported_languages": null}, "macro.dbt.default__type_timestamp": {"unique_id": "macro.dbt.default__type_timestamp", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "name": "default__type_timestamp", "macro_sql": "{% macro default__type_timestamp() %}\n {{ return(api.Column.translate_type(\"timestamp\")) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.801965, "supported_languages": null}, "macro.dbt.type_float": {"unique_id": "macro.dbt.type_float", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "name": "type_float", "macro_sql": "\n\n{%- macro type_float() -%}\n {{ return(adapter.dispatch('type_float', 'dbt')()) }}\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__type_float"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.802123, "supported_languages": null}, "macro.dbt.default__type_float": {"unique_id": "macro.dbt.default__type_float", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "name": "default__type_float", "macro_sql": "{% macro default__type_float() %}\n {{ return(api.Column.translate_type(\"float\")) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.8022761, "supported_languages": null}, "macro.dbt.type_numeric": {"unique_id": "macro.dbt.type_numeric", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "name": "type_numeric", "macro_sql": "\n\n{%- macro type_numeric() -%}\n {{ return(adapter.dispatch('type_numeric', 'dbt')()) }}\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__type_numeric"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.8024452, "supported_languages": null}, "macro.dbt.default__type_numeric": {"unique_id": "macro.dbt.default__type_numeric", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "name": "default__type_numeric", "macro_sql": "{% macro default__type_numeric() %}\n {{ return(api.Column.numeric_type(\"numeric\", 28, 6)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.802631, "supported_languages": null}, "macro.dbt.type_bigint": {"unique_id": "macro.dbt.type_bigint", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "name": "type_bigint", "macro_sql": "\n\n{%- macro type_bigint() -%}\n {{ return(adapter.dispatch('type_bigint', 'dbt')()) }}\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__type_bigint"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.8027909, "supported_languages": null}, "macro.dbt.default__type_bigint": {"unique_id": "macro.dbt.default__type_bigint", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "name": "default__type_bigint", "macro_sql": "{% macro default__type_bigint() %}\n {{ return(api.Column.translate_type(\"bigint\")) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.8029408, "supported_languages": null}, "macro.dbt.type_int": {"unique_id": "macro.dbt.type_int", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "name": "type_int", "macro_sql": "\n\n{%- macro type_int() -%}\n {{ return(adapter.dispatch('type_int', 'dbt')()) }}\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__type_int"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.8031008, "supported_languages": null}, "macro.dbt.default__type_int": {"unique_id": "macro.dbt.default__type_int", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "name": "default__type_int", "macro_sql": "{%- macro default__type_int() -%}\n {{ return(api.Column.translate_type(\"integer\")) }}\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.803244, "supported_languages": null}, "macro.dbt.type_boolean": {"unique_id": "macro.dbt.type_boolean", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "name": "type_boolean", "macro_sql": "\n\n{%- macro type_boolean() -%}\n {{ return(adapter.dispatch('type_boolean', 'dbt')()) }}\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__type_boolean"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.803404, "supported_languages": null}, "macro.dbt.default__type_boolean": {"unique_id": "macro.dbt.default__type_boolean", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "name": "default__type_boolean", "macro_sql": "{%- macro default__type_boolean() -%}\n {{ return(api.Column.translate_type(\"boolean\")) }}\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.803547, "supported_languages": null}, "macro.dbt.array_concat": {"unique_id": "macro.dbt.array_concat", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/utils/array_concat.sql", "original_file_path": "macros/utils/array_concat.sql", "name": "array_concat", "macro_sql": "{% macro array_concat(array_1, array_2) -%}\n {{ return(adapter.dispatch('array_concat', 'dbt')(array_1, array_2)) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__array_concat"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.8039098, "supported_languages": null}, "macro.dbt.default__array_concat": {"unique_id": "macro.dbt.default__array_concat", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/utils/array_concat.sql", "original_file_path": "macros/utils/array_concat.sql", "name": "default__array_concat", "macro_sql": "{% macro default__array_concat(array_1, array_2) -%}\n array_cat({{ array_1 }}, {{ array_2 }})\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.804042, "supported_languages": null}, "macro.dbt.bool_or": {"unique_id": "macro.dbt.bool_or", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/utils/bool_or.sql", "original_file_path": "macros/utils/bool_or.sql", "name": "bool_or", "macro_sql": "{% macro bool_or(expression) -%}\n {{ return(adapter.dispatch('bool_or', 'dbt') (expression)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__bool_or"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.804358, "supported_languages": null}, "macro.dbt.default__bool_or": {"unique_id": "macro.dbt.default__bool_or", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/utils/bool_or.sql", "original_file_path": "macros/utils/bool_or.sql", "name": "default__bool_or", "macro_sql": "{% macro default__bool_or(expression) -%}\n\n bool_or({{ expression }})\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.804459, "supported_languages": null}, "macro.dbt.last_day": {"unique_id": "macro.dbt.last_day", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/utils/last_day.sql", "original_file_path": "macros/utils/last_day.sql", "name": "last_day", "macro_sql": "{% macro last_day(date, datepart) %}\n {{ return(adapter.dispatch('last_day', 'dbt') (date, datepart)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_postgres.postgres__last_day"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.80487, "supported_languages": null}, "macro.dbt.default_last_day": {"unique_id": "macro.dbt.default_last_day", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/utils/last_day.sql", "original_file_path": "macros/utils/last_day.sql", "name": "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", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.dateadd", "macro.dbt.date_trunc"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.805134, "supported_languages": null}, "macro.dbt.default__last_day": {"unique_id": "macro.dbt.default__last_day", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/utils/last_day.sql", "original_file_path": "macros/utils/last_day.sql", "name": "default__last_day", "macro_sql": "{% macro default__last_day(date, datepart) -%}\n {{dbt.default_last_day(date, datepart)}}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default_last_day"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.805281, "supported_languages": null}, "macro.dbt.split_part": {"unique_id": "macro.dbt.split_part", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/utils/split_part.sql", "original_file_path": "macros/utils/split_part.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_postgres.postgres__split_part"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.80586, "supported_languages": null}, "macro.dbt.default__split_part": {"unique_id": "macro.dbt.default__split_part", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/utils/split_part.sql", "original_file_path": "macros/utils/split_part.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.806026, "supported_languages": null}, "macro.dbt._split_part_negative": {"unique_id": "macro.dbt._split_part_negative", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/utils/split_part.sql", "original_file_path": "macros/utils/split_part.sql", "name": "_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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.806318, "supported_languages": null}, "macro.dbt.date_trunc": {"unique_id": "macro.dbt.date_trunc", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/utils/date_trunc.sql", "original_file_path": "macros/utils/date_trunc.sql", "name": "date_trunc", "macro_sql": "{% macro date_trunc(datepart, date) -%}\n {{ return(adapter.dispatch('date_trunc', 'dbt') (datepart, date)) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__date_trunc"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.80669, "supported_languages": null}, "macro.dbt.default__date_trunc": {"unique_id": "macro.dbt.default__date_trunc", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/utils/date_trunc.sql", "original_file_path": "macros/utils/date_trunc.sql", "name": "default__date_trunc", "macro_sql": "{% macro default__date_trunc(datepart, date) -%}\n date_trunc('{{datepart}}', {{date}})\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.8068218, "supported_languages": null}, "macro.dbt.array_construct": {"unique_id": "macro.dbt.array_construct", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/utils/array_construct.sql", "original_file_path": "macros/utils/array_construct.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__array_construct"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.807273, "supported_languages": null}, "macro.dbt.default__array_construct": {"unique_id": "macro.dbt.default__array_construct", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/utils/array_construct.sql", "original_file_path": "macros/utils/array_construct.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.807515, "supported_languages": null}, "macro.dbt.array_append": {"unique_id": "macro.dbt.array_append", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/utils/array_append.sql", "original_file_path": "macros/utils/array_append.sql", "name": "array_append", "macro_sql": "{% macro array_append(array, new_element) -%}\n {{ return(adapter.dispatch('array_append', 'dbt')(array, new_element)) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__array_append"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.8078651, "supported_languages": null}, "macro.dbt.default__array_append": {"unique_id": "macro.dbt.default__array_append", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/utils/array_append.sql", "original_file_path": "macros/utils/array_append.sql", "name": "default__array_append", "macro_sql": "{% macro default__array_append(array, new_element) -%}\n array_append({{ array }}, {{ new_element }})\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.807998, "supported_languages": null}, "macro.dbt.create_schema": {"unique_id": "macro.dbt.create_schema", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/schema.sql", "original_file_path": "macros/adapters/schema.sql", "name": "create_schema", "macro_sql": "{% macro create_schema(relation) -%}\n {{ adapter.dispatch('create_schema', 'dbt')(relation) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_postgres.postgres__create_schema"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.8084412, "supported_languages": null}, "macro.dbt.default__create_schema": {"unique_id": "macro.dbt.default__create_schema", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/schema.sql", "original_file_path": "macros/adapters/schema.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.80862, "supported_languages": null}, "macro.dbt.drop_schema": {"unique_id": "macro.dbt.drop_schema", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/schema.sql", "original_file_path": "macros/adapters/schema.sql", "name": "drop_schema", "macro_sql": "{% macro drop_schema(relation) -%}\n {{ adapter.dispatch('drop_schema', 'dbt')(relation) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_postgres.postgres__drop_schema"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.808782, "supported_languages": null}, "macro.dbt.default__drop_schema": {"unique_id": "macro.dbt.default__drop_schema", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/schema.sql", "original_file_path": "macros/adapters/schema.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.808963, "supported_languages": null}, "macro.dbt.current_timestamp": {"unique_id": "macro.dbt.current_timestamp", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/timestamps.sql", "original_file_path": "macros/adapters/timestamps.sql", "name": "current_timestamp", "macro_sql": "{%- macro current_timestamp() -%}\n {{ adapter.dispatch('current_timestamp', 'dbt')() }}\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_postgres.postgres__current_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.8094962, "supported_languages": null}, "macro.dbt.default__current_timestamp": {"unique_id": "macro.dbt.default__current_timestamp", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/timestamps.sql", "original_file_path": "macros/adapters/timestamps.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.809643, "supported_languages": null}, "macro.dbt.snapshot_get_time": {"unique_id": "macro.dbt.snapshot_get_time", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/timestamps.sql", "original_file_path": "macros/adapters/timestamps.sql", "name": "snapshot_get_time", "macro_sql": "\n\n{%- macro snapshot_get_time() -%}\n {{ adapter.dispatch('snapshot_get_time', 'dbt')() }}\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_postgres.postgres__snapshot_get_time"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.809783, "supported_languages": null}, "macro.dbt.default__snapshot_get_time": {"unique_id": "macro.dbt.default__snapshot_get_time", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/timestamps.sql", "original_file_path": "macros/adapters/timestamps.sql", "name": "default__snapshot_get_time", "macro_sql": "{% macro default__snapshot_get_time() %}\n {{ current_timestamp() }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.current_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.80989, "supported_languages": null}, "macro.dbt.current_timestamp_backcompat": {"unique_id": "macro.dbt.current_timestamp_backcompat", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/timestamps.sql", "original_file_path": "macros/adapters/timestamps.sql", "name": "current_timestamp_backcompat", "macro_sql": "{% macro current_timestamp_backcompat() %}\n {{ return(adapter.dispatch('current_timestamp_backcompat', 'dbt')()) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_postgres.postgres__current_timestamp_backcompat"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.8100579, "supported_languages": null}, "macro.dbt.default__current_timestamp_backcompat": {"unique_id": "macro.dbt.default__current_timestamp_backcompat", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/timestamps.sql", "original_file_path": "macros/adapters/timestamps.sql", "name": "default__current_timestamp_backcompat", "macro_sql": "{% macro default__current_timestamp_backcompat() %}\n current_timestamp::timestamp\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.810136, "supported_languages": null}, "macro.dbt.current_timestamp_in_utc_backcompat": {"unique_id": "macro.dbt.current_timestamp_in_utc_backcompat", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/timestamps.sql", "original_file_path": "macros/adapters/timestamps.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_postgres.postgres__current_timestamp_in_utc_backcompat"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.810306, "supported_languages": null}, "macro.dbt.default__current_timestamp_in_utc_backcompat": {"unique_id": "macro.dbt.default__current_timestamp_in_utc_backcompat", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/timestamps.sql", "original_file_path": "macros/adapters/timestamps.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.current_timestamp_backcompat", "macro.dbt_postgres.postgres__current_timestamp_backcompat"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.810477, "supported_languages": null}, "macro.dbt.get_create_index_sql": {"unique_id": "macro.dbt.get_create_index_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/indexes.sql", "original_file_path": "macros/adapters/indexes.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_postgres.postgres__get_create_index_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.8109949, "supported_languages": null}, "macro.dbt.default__get_create_index_sql": {"unique_id": "macro.dbt.default__get_create_index_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/indexes.sql", "original_file_path": "macros/adapters/indexes.sql", "name": "default__get_create_index_sql", "macro_sql": "{% macro default__get_create_index_sql(relation, index_dict) -%}\n {% do return(None) %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.8112, "supported_languages": null}, "macro.dbt.create_indexes": {"unique_id": "macro.dbt.create_indexes", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/indexes.sql", "original_file_path": "macros/adapters/indexes.sql", "name": "create_indexes", "macro_sql": "{% macro create_indexes(relation) -%}\n {{ adapter.dispatch('create_indexes', 'dbt')(relation) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__create_indexes"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.8113532, "supported_languages": null}, "macro.dbt.default__create_indexes": {"unique_id": "macro.dbt.default__create_indexes", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/indexes.sql", "original_file_path": "macros/adapters/indexes.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.get_create_index_sql", "macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.81175, "supported_languages": null}, "macro.dbt.make_intermediate_relation": {"unique_id": "macro.dbt.make_intermediate_relation", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_postgres.postgres__make_intermediate_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.814825, "supported_languages": null}, "macro.dbt.default__make_intermediate_relation": {"unique_id": "macro.dbt.default__make_intermediate_relation", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__make_temp_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.814993, "supported_languages": null}, "macro.dbt.make_temp_relation": {"unique_id": "macro.dbt.make_temp_relation", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "name": "make_temp_relation", "macro_sql": "{% macro make_temp_relation(base_relation, suffix='__dbt_tmp') %}\n {{ return(adapter.dispatch('make_temp_relation', 'dbt')(base_relation, suffix)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_postgres.postgres__make_temp_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.815207, "supported_languages": null}, "macro.dbt.default__make_temp_relation": {"unique_id": "macro.dbt.default__make_temp_relation", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.8154979, "supported_languages": null}, "macro.dbt.make_backup_relation": {"unique_id": "macro.dbt.make_backup_relation", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_postgres.postgres__make_backup_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.815743, "supported_languages": null}, "macro.dbt.default__make_backup_relation": {"unique_id": "macro.dbt.default__make_backup_relation", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.816062, "supported_languages": null}, "macro.dbt.drop_relation": {"unique_id": "macro.dbt.drop_relation", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "name": "drop_relation", "macro_sql": "{% macro drop_relation(relation) -%}\n {{ return(adapter.dispatch('drop_relation', 'dbt')(relation)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__drop_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.816239, "supported_languages": null}, "macro.dbt.default__drop_relation": {"unique_id": "macro.dbt.default__drop_relation", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "name": "default__drop_relation", "macro_sql": "{% macro default__drop_relation(relation) -%}\n {% call statement('drop_relation', auto_begin=False) -%}\n drop {{ relation.type }} if exists {{ relation }} cascade\n {%- endcall %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.816451, "supported_languages": null}, "macro.dbt.truncate_relation": {"unique_id": "macro.dbt.truncate_relation", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "name": "truncate_relation", "macro_sql": "{% macro truncate_relation(relation) -%}\n {{ return(adapter.dispatch('truncate_relation', 'dbt')(relation)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__truncate_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.816629, "supported_languages": null}, "macro.dbt.default__truncate_relation": {"unique_id": "macro.dbt.default__truncate_relation", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "name": "default__truncate_relation", "macro_sql": "{% macro default__truncate_relation(relation) -%}\n {% call statement('truncate_relation') -%}\n truncate table {{ relation }}\n {%- endcall %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.816789, "supported_languages": null}, "macro.dbt.rename_relation": {"unique_id": "macro.dbt.rename_relation", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "name": "rename_relation", "macro_sql": "{% macro rename_relation(from_relation, to_relation) -%}\n {{ return(adapter.dispatch('rename_relation', 'dbt')(from_relation, to_relation)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__rename_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.816989, "supported_languages": null}, "macro.dbt.default__rename_relation": {"unique_id": "macro.dbt.default__rename_relation", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "name": "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 }} rename to {{ target_name }}\n {%- endcall %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.8172622, "supported_languages": null}, "macro.dbt.get_or_create_relation": {"unique_id": "macro.dbt.get_or_create_relation", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__get_or_create_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.8175008, "supported_languages": null}, "macro.dbt.default__get_or_create_relation": {"unique_id": "macro.dbt.default__get_or_create_relation", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.818101, "supported_languages": null}, "macro.dbt.load_cached_relation": {"unique_id": "macro.dbt.load_cached_relation", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.818429, "supported_languages": null}, "macro.dbt.load_relation": {"unique_id": "macro.dbt.load_relation", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "name": "load_relation", "macro_sql": "{% macro load_relation(relation) %}\n {{ return(load_cached_relation(relation)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.load_cached_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.818589, "supported_languages": null}, "macro.dbt.drop_relation_if_exists": {"unique_id": "macro.dbt.drop_relation_if_exists", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.8187861, "supported_languages": null}, "macro.dbt.collect_freshness": {"unique_id": "macro.dbt.collect_freshness", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/freshness.sql", "original_file_path": "macros/adapters/freshness.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__collect_freshness"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.819305, "supported_languages": null}, "macro.dbt.default__collect_freshness": {"unique_id": "macro.dbt.default__collect_freshness", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/freshness.sql", "original_file_path": "macros/adapters/freshness.sql", "name": "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').table) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement", "macro.dbt.current_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.819726, "supported_languages": null}, "macro.dbt.copy_grants": {"unique_id": "macro.dbt.copy_grants", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "name": "copy_grants", "macro_sql": "{% macro copy_grants() %}\n {{ return(adapter.dispatch('copy_grants', 'dbt')()) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_postgres.postgres__copy_grants"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.8214002, "supported_languages": null}, "macro.dbt.default__copy_grants": {"unique_id": "macro.dbt.default__copy_grants", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "name": "default__copy_grants", "macro_sql": "{% macro default__copy_grants() %}\n {{ return(True) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.8215208, "supported_languages": null}, "macro.dbt.support_multiple_grantees_per_dcl_statement": {"unique_id": "macro.dbt.support_multiple_grantees_per_dcl_statement", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__support_multiple_grantees_per_dcl_statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.821686, "supported_languages": null}, "macro.dbt.default__support_multiple_grantees_per_dcl_statement": {"unique_id": "macro.dbt.default__support_multiple_grantees_per_dcl_statement", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "name": "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", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.8217971, "supported_languages": null}, "macro.dbt.should_revoke": {"unique_id": "macro.dbt.should_revoke", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.copy_grants"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.822138, "supported_languages": null}, "macro.dbt.get_show_grant_sql": {"unique_id": "macro.dbt.get_show_grant_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "name": "get_show_grant_sql", "macro_sql": "{% macro get_show_grant_sql(relation) %}\n {{ return(adapter.dispatch(\"get_show_grant_sql\", \"dbt\")(relation)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_postgres.postgres__get_show_grant_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.822328, "supported_languages": null}, "macro.dbt.default__get_show_grant_sql": {"unique_id": "macro.dbt.default__get_show_grant_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "name": "default__get_show_grant_sql", "macro_sql": "{% macro default__get_show_grant_sql(relation) %}\n show grants on {{ relation }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.822428, "supported_languages": null}, "macro.dbt.get_grant_sql": {"unique_id": "macro.dbt.get_grant_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__get_grant_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.822654, "supported_languages": null}, "macro.dbt.default__get_grant_sql": {"unique_id": "macro.dbt.default__get_grant_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "name": "default__get_grant_sql", "macro_sql": "\n\n{%- macro default__get_grant_sql(relation, privilege, grantees) -%}\n grant {{ privilege }} on {{ relation }} to {{ grantees | join(', ') }}\n{%- endmacro -%}\n\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.822839, "supported_languages": null}, "macro.dbt.get_revoke_sql": {"unique_id": "macro.dbt.get_revoke_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__get_revoke_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.823067, "supported_languages": null}, "macro.dbt.default__get_revoke_sql": {"unique_id": "macro.dbt.default__get_revoke_sql", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "name": "default__get_revoke_sql", "macro_sql": "\n\n{%- macro default__get_revoke_sql(relation, privilege, grantees) -%}\n revoke {{ privilege }} on {{ relation }} from {{ grantees | join(', ') }}\n{%- endmacro -%}\n\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.8232498, "supported_languages": null}, "macro.dbt.get_dcl_statement_list": {"unique_id": "macro.dbt.get_dcl_statement_list", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__get_dcl_statement_list"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.823481, "supported_languages": null}, "macro.dbt.default__get_dcl_statement_list": {"unique_id": "macro.dbt.default__get_dcl_statement_list", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.support_multiple_grantees_per_dcl_statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.8241549, "supported_languages": null}, "macro.dbt.call_dcl_statements": {"unique_id": "macro.dbt.call_dcl_statements", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__call_dcl_statements"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.824409, "supported_languages": null}, "macro.dbt.default__call_dcl_statements": {"unique_id": "macro.dbt.default__call_dcl_statements", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.824658, "supported_languages": null}, "macro.dbt.apply_grants": {"unique_id": "macro.dbt.apply_grants", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__apply_grants"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.824885, "supported_languages": null}, "macro.dbt.default__apply_grants": {"unique_id": "macro.dbt.default__apply_grants", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "name": "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 ~': 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 %}", "resource_type": "macro", "tags": [], "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}, "patch_path": null, "arguments": [], "created_at": 1671505472.826005, "supported_languages": null}, "macro.dbt.alter_column_comment": {"unique_id": "macro.dbt.alter_column_comment", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/persist_docs.sql", "original_file_path": "macros/adapters/persist_docs.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_postgres.postgres__alter_column_comment"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.8267689, "supported_languages": null}, "macro.dbt.default__alter_column_comment": {"unique_id": "macro.dbt.default__alter_column_comment", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/persist_docs.sql", "original_file_path": "macros/adapters/persist_docs.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.826944, "supported_languages": null}, "macro.dbt.alter_relation_comment": {"unique_id": "macro.dbt.alter_relation_comment", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/persist_docs.sql", "original_file_path": "macros/adapters/persist_docs.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_postgres.postgres__alter_relation_comment"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.8271518, "supported_languages": null}, "macro.dbt.default__alter_relation_comment": {"unique_id": "macro.dbt.default__alter_relation_comment", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/persist_docs.sql", "original_file_path": "macros/adapters/persist_docs.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.827323, "supported_languages": null}, "macro.dbt.persist_docs": {"unique_id": "macro.dbt.persist_docs", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/persist_docs.sql", "original_file_path": "macros/adapters/persist_docs.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__persist_docs"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.8275928, "supported_languages": null}, "macro.dbt.default__persist_docs": {"unique_id": "macro.dbt.default__persist_docs", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/persist_docs.sql", "original_file_path": "macros/adapters/persist_docs.sql", "name": "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 {% do run_query(alter_column_comment(relation, model.columns)) %}\n {% endif %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.run_query", "macro.dbt.alter_relation_comment", "macro.dbt.alter_column_comment"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.82807, "supported_languages": null}, "macro.dbt.get_catalog": {"unique_id": "macro.dbt.get_catalog", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "name": "get_catalog", "macro_sql": "{% macro get_catalog(information_schema, schemas) -%}\n {{ return(adapter.dispatch('get_catalog', 'dbt')(information_schema, schemas)) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_postgres.postgres__get_catalog"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.829534, "supported_languages": null}, "macro.dbt.default__get_catalog": {"unique_id": "macro.dbt.default__get_catalog", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.829792, "supported_languages": null}, "macro.dbt.information_schema_name": {"unique_id": "macro.dbt.information_schema_name", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "name": "information_schema_name", "macro_sql": "{% macro information_schema_name(database) %}\n {{ return(adapter.dispatch('information_schema_name', 'dbt')(database)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_postgres.postgres__information_schema_name"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.829977, "supported_languages": null}, "macro.dbt.default__information_schema_name": {"unique_id": "macro.dbt.default__information_schema_name", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.8301282, "supported_languages": null}, "macro.dbt.list_schemas": {"unique_id": "macro.dbt.list_schemas", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "name": "list_schemas", "macro_sql": "{% macro list_schemas(database) -%}\n {{ return(adapter.dispatch('list_schemas', 'dbt')(database)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_postgres.postgres__list_schemas"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.830305, "supported_languages": null}, "macro.dbt.default__list_schemas": {"unique_id": "macro.dbt.default__list_schemas", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.information_schema_name", "macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.8305469, "supported_languages": null}, "macro.dbt.check_schema_exists": {"unique_id": "macro.dbt.check_schema_exists", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_postgres.postgres__check_schema_exists"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.8307562, "supported_languages": null}, "macro.dbt.default__check_schema_exists": {"unique_id": "macro.dbt.default__check_schema_exists", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.replace", "macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.831051, "supported_languages": null}, "macro.dbt.list_relations_without_caching": {"unique_id": "macro.dbt.list_relations_without_caching", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_postgres.postgres__list_relations_without_caching"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.831237, "supported_languages": null}, "macro.dbt.default__list_relations_without_caching": {"unique_id": "macro.dbt.default__list_relations_without_caching", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.831399, "supported_languages": null}, "macro.dbt.get_columns_in_relation": {"unique_id": "macro.dbt.get_columns_in_relation", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "name": "get_columns_in_relation", "macro_sql": "{% macro get_columns_in_relation(relation) -%}\n {{ return(adapter.dispatch('get_columns_in_relation', 'dbt')(relation)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_postgres.postgres__get_columns_in_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.8330638, "supported_languages": null}, "macro.dbt.default__get_columns_in_relation": {"unique_id": "macro.dbt.default__get_columns_in_relation", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.833508, "supported_languages": null}, "macro.dbt.sql_convert_columns_in_relation": {"unique_id": "macro.dbt.sql_convert_columns_in_relation", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.8338208, "supported_languages": null}, "macro.dbt.get_columns_in_query": {"unique_id": "macro.dbt.get_columns_in_query", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__get_columns_in_query"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.8340008, "supported_languages": null}, "macro.dbt.default__get_columns_in_query": {"unique_id": "macro.dbt.default__get_columns_in_query", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "name": "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 select * from (\n {{ select_sql }}\n ) as __dbt_sbq\n where false\n limit 0\n {% endcall %}\n\n {{ return(load_result('get_columns_in_query').table.columns | map(attribute='name') | list) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.834344, "supported_languages": null}, "macro.dbt.alter_column_type": {"unique_id": "macro.dbt.alter_column_type", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__alter_column_type"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.834569, "supported_languages": null}, "macro.dbt.default__alter_column_type": {"unique_id": "macro.dbt.default__alter_column_type", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "name": "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 }} add column {{ adapter.quote(tmp_column) }} {{ new_column_type }};\n update {{ relation }} set {{ adapter.quote(tmp_column) }} = {{ adapter.quote(column_name) }};\n alter table {{ relation }} drop column {{ adapter.quote(column_name) }} cascade;\n alter table {{ relation }} rename column {{ adapter.quote(tmp_column) }} to {{ adapter.quote(column_name) }}\n {% endcall %}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.835155, "supported_languages": null}, "macro.dbt.alter_relation_add_remove_columns": {"unique_id": "macro.dbt.alter_relation_add_remove_columns", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__alter_relation_add_remove_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.8354182, "supported_languages": null}, "macro.dbt.default__alter_relation_add_remove_columns": {"unique_id": "macro.dbt.default__alter_relation_add_remove_columns", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "name": "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 }}\n\n {% for column in add_columns %}\n add column {{ column.name }} {{ column.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.name }}{{ ',' if not loop.last }}\n {% endfor %}\n\n {%- endset -%}\n\n {% do run_query(sql) %}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.836181, "supported_languages": null}, "macro.dbt.build_ref_function": {"unique_id": "macro.dbt.build_ref_function", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/python_model/python.sql", "original_file_path": "macros/python_model/python.sql", "name": "build_ref_function", "macro_sql": "{% macro build_ref_function(model) %}\n\n {%- set ref_dict = {} -%}\n {%- for _ref in model.refs -%}\n {%- set resolved = ref(*_ref) -%}\n {%- do ref_dict.update({_ref | join(\".\"): resolved.quote(database=False, schema=False, identifier=False) | string}) -%}\n {%- endfor -%}\n\ndef ref(*args,dbt_load_df_function):\n refs = {{ ref_dict | tojson }}\n key = \".\".join(args)\n return dbt_load_df_function(refs[key])\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.837661, "supported_languages": null}, "macro.dbt.build_source_function": {"unique_id": "macro.dbt.build_source_function", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/python_model/python.sql", "original_file_path": "macros/python_model/python.sql", "name": "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(\".\"): resolved.quote(database=False, schema=False, identifier=False) | string}) -%}\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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.838122, "supported_languages": null}, "macro.dbt.build_config_dict": {"unique_id": "macro.dbt.build_config_dict", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/python_model/python.sql", "original_file_path": "macros/python_model/python.sql", "name": "build_config_dict", "macro_sql": "{% macro build_config_dict(model) %}\n {%- set config_dict = {} -%}\n {%- for key in model.config.config_keys_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[key] -%}\n {%- do config_dict.update({key: value}) -%}\n {%- endfor -%}\nconfig_dict = {{ config_dict }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.83856, "supported_languages": null}, "macro.dbt.py_script_postfix": {"unique_id": "macro.dbt.py_script_postfix", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/python_model/python.sql", "original_file_path": "macros/python_model/python.sql", "name": "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\nclass this:\n \"\"\"dbt.this() or dbt.this.identifier\"\"\"\n database = '{{ this.database }}'\n schema = '{{ this.schema }}'\n identifier = '{{ this.identifier }}'\n def __repr__(self):\n return '{{ this }}'\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: ref(*args, 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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.build_ref_function", "macro.dbt.build_source_function", "macro.dbt.build_config_dict", "macro.dbt.is_incremental", "macro.dbt.py_script_comment"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.838956, "supported_languages": null}, "macro.dbt.py_script_comment": {"unique_id": "macro.dbt.py_script_comment", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "macros/python_model/python.sql", "original_file_path": "macros/python_model/python.sql", "name": "py_script_comment", "macro_sql": "{%macro py_script_comment()%}\n{%endmacro%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.839031, "supported_languages": null}, "macro.dbt.test_unique": {"unique_id": "macro.dbt.test_unique", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "tests/generic/builtin.sql", "original_file_path": "tests/generic/builtin.sql", "name": "test_unique", "macro_sql": "{% test unique(model, column_name) %}\n {% set macro = adapter.dispatch('test_unique', 'dbt') %}\n {{ macro(model, column_name) }}\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__test_unique"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.839603, "supported_languages": null}, "macro.dbt.test_not_null": {"unique_id": "macro.dbt.test_not_null", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "tests/generic/builtin.sql", "original_file_path": "tests/generic/builtin.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__test_not_null"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.839829, "supported_languages": null}, "macro.dbt.test_accepted_values": {"unique_id": "macro.dbt.test_accepted_values", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "tests/generic/builtin.sql", "original_file_path": "tests/generic/builtin.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__test_accepted_values"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.8401122, "supported_languages": null}, "macro.dbt.test_relationships": {"unique_id": "macro.dbt.test_relationships", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "tests/generic/builtin.sql", "original_file_path": "tests/generic/builtin.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__test_relationships"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.840381, "supported_languages": null}, "macro.dbt_utils.get_url_host": {"unique_id": "macro.dbt_utils.get_url_host", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/web/get_url_host.sql", "original_file_path": "macros/web/get_url_host.sql", "name": "get_url_host", "macro_sql": "{% macro get_url_host(field) -%}\n {{ return(adapter.dispatch('get_url_host', 'dbt_utils')(field)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__get_url_host"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.8407922, "supported_languages": null}, "macro.dbt_utils.default__get_url_host": {"unique_id": "macro.dbt_utils.default__get_url_host", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/web/get_url_host.sql", "original_file_path": "macros/web/get_url_host.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "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}, "patch_path": null, "arguments": [], "created_at": 1671505472.841331, "supported_languages": null}, "macro.dbt_utils.get_url_path": {"unique_id": "macro.dbt_utils.get_url_path", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/web/get_url_path.sql", "original_file_path": "macros/web/get_url_path.sql", "name": "get_url_path", "macro_sql": "{% macro get_url_path(field) -%}\n {{ return(adapter.dispatch('get_url_path', 'dbt_utils')(field)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__get_url_path"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.841856, "supported_languages": null}, "macro.dbt_utils.default__get_url_path": {"unique_id": "macro.dbt_utils.default__get_url_path", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/web/get_url_path.sql", "original_file_path": "macros/web/get_url_path.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "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}, "patch_path": null, "arguments": [], "created_at": 1671505472.842494, "supported_languages": null}, "macro.dbt_utils.get_url_parameter": {"unique_id": "macro.dbt_utils.get_url_parameter", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/web/get_url_parameter.sql", "original_file_path": "macros/web/get_url_parameter.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__get_url_parameter"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.8428822, "supported_languages": null}, "macro.dbt_utils.default__get_url_parameter": {"unique_id": "macro.dbt_utils.default__get_url_parameter", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/web/get_url_parameter.sql", "original_file_path": "macros/web/get_url_parameter.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.split_part"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.843193, "supported_languages": null}, "macro.dbt_utils.test_fewer_rows_than": {"unique_id": "macro.dbt_utils.test_fewer_rows_than", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/fewer_rows_than.sql", "original_file_path": "macros/generic_tests/fewer_rows_than.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_fewer_rows_than"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.844324, "supported_languages": null}, "macro.dbt_utils.default__test_fewer_rows_than": {"unique_id": "macro.dbt_utils.default__test_fewer_rows_than", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/fewer_rows_than.sql", "original_file_path": "macros/generic_tests/fewer_rows_than.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.845345, "supported_languages": null}, "macro.dbt_utils.test_equal_rowcount": {"unique_id": "macro.dbt_utils.test_equal_rowcount", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/equal_rowcount.sql", "original_file_path": "macros/generic_tests/equal_rowcount.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_equal_rowcount"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.846234, "supported_languages": null}, "macro.dbt_utils.default__test_equal_rowcount": {"unique_id": "macro.dbt_utils.default__test_equal_rowcount", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/equal_rowcount.sql", "original_file_path": "macros/generic_tests/equal_rowcount.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.8472881, "supported_languages": null}, "macro.dbt_utils.test_relationships_where": {"unique_id": "macro.dbt_utils.test_relationships_where", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/relationships_where.sql", "original_file_path": "macros/generic_tests/relationships_where.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_relationships_where"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.847989, "supported_languages": null}, "macro.dbt_utils.default__test_relationships_where": {"unique_id": "macro.dbt_utils.default__test_relationships_where", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/relationships_where.sql", "original_file_path": "macros/generic_tests/relationships_where.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.848331, "supported_languages": null}, "macro.dbt_utils.test_recency": {"unique_id": "macro.dbt_utils.test_recency", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/recency.sql", "original_file_path": "macros/generic_tests/recency.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_recency"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.849098, "supported_languages": null}, "macro.dbt_utils.default__test_recency": {"unique_id": "macro.dbt_utils.default__test_recency", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/recency.sql", "original_file_path": "macros/generic_tests/recency.sql", "name": "default__test_recency", "macro_sql": "{% macro default__test_recency(model, field, datepart, interval, ignore_time_component, group_by_columns) %}\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\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.dateadd", "macro.dbt.current_timestamp", "macro.dbt.type_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.849942, "supported_languages": null}, "macro.dbt_utils.test_not_constant": {"unique_id": "macro.dbt_utils.test_not_constant", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/not_constant.sql", "original_file_path": "macros/generic_tests/not_constant.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_not_constant"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.850472, "supported_languages": null}, "macro.dbt_utils.default__test_not_constant": {"unique_id": "macro.dbt_utils.default__test_not_constant", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/not_constant.sql", "original_file_path": "macros/generic_tests/not_constant.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.850935, "supported_languages": null}, "macro.dbt_utils.test_accepted_range": {"unique_id": "macro.dbt_utils.test_accepted_range", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/accepted_range.sql", "original_file_path": "macros/generic_tests/accepted_range.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_accepted_range"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.8516219, "supported_languages": null}, "macro.dbt_utils.default__test_accepted_range": {"unique_id": "macro.dbt_utils.default__test_accepted_range", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/accepted_range.sql", "original_file_path": "macros/generic_tests/accepted_range.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.852106, "supported_languages": null}, "macro.dbt_utils.test_not_accepted_values": {"unique_id": "macro.dbt_utils.test_not_accepted_values", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/not_accepted_values.sql", "original_file_path": "macros/generic_tests/not_accepted_values.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_not_accepted_values"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.852731, "supported_languages": null}, "macro.dbt_utils.default__test_not_accepted_values": {"unique_id": "macro.dbt_utils.default__test_not_accepted_values", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/not_accepted_values.sql", "original_file_path": "macros/generic_tests/not_accepted_values.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.8532171, "supported_languages": null}, "macro.dbt_utils.test_at_least_one": {"unique_id": "macro.dbt_utils.test_at_least_one", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/at_least_one.sql", "original_file_path": "macros/generic_tests/at_least_one.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_at_least_one"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.853764, "supported_languages": null}, "macro.dbt_utils.default__test_at_least_one": {"unique_id": "macro.dbt_utils.default__test_at_least_one", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/at_least_one.sql", "original_file_path": "macros/generic_tests/at_least_one.sql", "name": "default__test_at_least_one", "macro_sql": "{% macro default__test_at_least_one(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\nselect *\nfrom (\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 {{ model }}\n\n {{groupby_gb_cols}}\n\n having count({{ column_name }}) = 0\n\n) validation_errors\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.8542552, "supported_languages": null}, "macro.dbt_utils.test_unique_combination_of_columns": {"unique_id": "macro.dbt_utils.test_unique_combination_of_columns", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/unique_combination_of_columns.sql", "original_file_path": "macros/generic_tests/unique_combination_of_columns.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_unique_combination_of_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.854961, "supported_languages": null}, "macro.dbt_utils.default__test_unique_combination_of_columns": {"unique_id": "macro.dbt_utils.default__test_unique_combination_of_columns", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/unique_combination_of_columns.sql", "original_file_path": "macros/generic_tests/unique_combination_of_columns.sql", "name": "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 {% set column_list = 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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.855615, "supported_languages": null}, "macro.dbt_utils.test_cardinality_equality": {"unique_id": "macro.dbt_utils.test_cardinality_equality", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/cardinality_equality.sql", "original_file_path": "macros/generic_tests/cardinality_equality.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_cardinality_equality"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.8562481, "supported_languages": null}, "macro.dbt_utils.default__test_cardinality_equality": {"unique_id": "macro.dbt_utils.default__test_cardinality_equality", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/cardinality_equality.sql", "original_file_path": "macros/generic_tests/cardinality_equality.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.except"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.856597, "supported_languages": null}, "macro.dbt_utils.test_expression_is_true": {"unique_id": "macro.dbt_utils.test_expression_is_true", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/expression_is_true.sql", "original_file_path": "macros/generic_tests/expression_is_true.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_expression_is_true"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.8570728, "supported_languages": null}, "macro.dbt_utils.default__test_expression_is_true": {"unique_id": "macro.dbt_utils.default__test_expression_is_true", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/expression_is_true.sql", "original_file_path": "macros/generic_tests/expression_is_true.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.should_store_failures"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.85744, "supported_languages": null}, "macro.dbt_utils.test_not_null_proportion": {"unique_id": "macro.dbt_utils.test_not_null_proportion", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/not_null_proportion.sql", "original_file_path": "macros/generic_tests/not_null_proportion.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_not_null_proportion"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.858145, "supported_languages": null}, "macro.dbt_utils.default__test_not_null_proportion": {"unique_id": "macro.dbt_utils.default__test_not_null_proportion", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/not_null_proportion.sql", "original_file_path": "macros/generic_tests/not_null_proportion.sql", "name": "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 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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.858988, "supported_languages": null}, "macro.dbt_utils.test_sequential_values": {"unique_id": "macro.dbt_utils.test_sequential_values", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/sequential_values.sql", "original_file_path": "macros/generic_tests/sequential_values.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_sequential_values"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.8600981, "supported_languages": null}, "macro.dbt_utils.default__test_sequential_values": {"unique_id": "macro.dbt_utils.default__test_sequential_values", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/sequential_values.sql", "original_file_path": "macros/generic_tests/sequential_values.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.slugify", "macro.dbt.type_timestamp", "macro.dbt.dateadd"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.861017, "supported_languages": null}, "macro.dbt_utils.test_equality": {"unique_id": "macro.dbt_utils.test_equality", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/equality.sql", "original_file_path": "macros/generic_tests/equality.sql", "name": "test_equality", "macro_sql": "{% test equality(model, compare_model, compare_columns=None) %}\n {{ return(adapter.dispatch('test_equality', 'dbt_utils')(model, compare_model, compare_columns)) }}\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_equality"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.861898, "supported_languages": null}, "macro.dbt_utils.default__test_equality": {"unique_id": "macro.dbt_utils.default__test_equality", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/equality.sql", "original_file_path": "macros/generic_tests/equality.sql", "name": "default__test_equality", "macro_sql": "{% macro default__test_equality(model, compare_model, compare_columns=None) %}\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-- setup\n{%- do dbt_utils._is_relation(model, 'test_equality') -%}\n\n{#-\nIf the compare_cols arg is provided, we can run this test without querying the\ninformation schema\u00a0\u2014 this allows the model to be an ephemeral model\n-#}\n\n{%- if not compare_columns -%}\n {%- do dbt_utils._is_ephemeral(model, 'test_equality') -%}\n {%- set compare_columns = adapter.get_columns_in_relation(model) | map(attribute='quoted') -%}\n{%- endif -%}\n\n{% set compare_cols_csv = compare_columns | join(', ') %}\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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils._is_relation", "macro.dbt_utils._is_ephemeral", "macro.dbt.except"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.862773, "supported_languages": null}, "macro.dbt_utils.test_not_empty_string": {"unique_id": "macro.dbt_utils.test_not_empty_string", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/not_empty_string.sql", "original_file_path": "macros/generic_tests/not_empty_string.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_not_empty_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.863342, "supported_languages": null}, "macro.dbt_utils.default__test_not_empty_string": {"unique_id": "macro.dbt_utils.default__test_not_empty_string", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/not_empty_string.sql", "original_file_path": "macros/generic_tests/not_empty_string.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.863637, "supported_languages": null}, "macro.dbt_utils.test_mutually_exclusive_ranges": {"unique_id": "macro.dbt_utils.test_mutually_exclusive_ranges", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/mutually_exclusive_ranges.sql", "original_file_path": "macros/generic_tests/mutually_exclusive_ranges.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__test_mutually_exclusive_ranges"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.866894, "supported_languages": null}, "macro.dbt_utils.default__test_mutually_exclusive_ranges": {"unique_id": "macro.dbt_utils.default__test_mutually_exclusive_ranges", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/generic_tests/mutually_exclusive_ranges.sql", "original_file_path": "macros/generic_tests/mutually_exclusive_ranges.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.868533, "supported_languages": null}, "macro.dbt_utils.pretty_log_format": {"unique_id": "macro.dbt_utils.pretty_log_format", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/jinja_helpers/pretty_log_format.sql", "original_file_path": "macros/jinja_helpers/pretty_log_format.sql", "name": "pretty_log_format", "macro_sql": "{% macro pretty_log_format(message) %}\n {{ return(adapter.dispatch('pretty_log_format', 'dbt_utils')(message)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__pretty_log_format"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.868939, "supported_languages": null}, "macro.dbt_utils.default__pretty_log_format": {"unique_id": "macro.dbt_utils.default__pretty_log_format", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/jinja_helpers/pretty_log_format.sql", "original_file_path": "macros/jinja_helpers/pretty_log_format.sql", "name": "default__pretty_log_format", "macro_sql": "{% macro default__pretty_log_format(message) %}\n {{ return( dbt_utils.pretty_time() ~ ' + ' ~ message) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.pretty_time"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.8691058, "supported_languages": null}, "macro.dbt_utils._is_relation": {"unique_id": "macro.dbt_utils._is_relation", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/jinja_helpers/_is_relation.sql", "original_file_path": "macros/jinja_helpers/_is_relation.sql", "name": "_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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.8697531, "supported_languages": null}, "macro.dbt_utils.pretty_time": {"unique_id": "macro.dbt_utils.pretty_time", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/jinja_helpers/pretty_time.sql", "original_file_path": "macros/jinja_helpers/pretty_time.sql", "name": "pretty_time", "macro_sql": "{% macro pretty_time(format='%H:%M:%S') %}\n {{ return(adapter.dispatch('pretty_time', 'dbt_utils')(format)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__pretty_time"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.8702579, "supported_languages": null}, "macro.dbt_utils.default__pretty_time": {"unique_id": "macro.dbt_utils.default__pretty_time", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/jinja_helpers/pretty_time.sql", "original_file_path": "macros/jinja_helpers/pretty_time.sql", "name": "default__pretty_time", "macro_sql": "{% macro default__pretty_time(format='%H:%M:%S') %}\n {{ return(modules.datetime.datetime.now().strftime(format)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.870492, "supported_languages": null}, "macro.dbt_utils.log_info": {"unique_id": "macro.dbt_utils.log_info", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/jinja_helpers/log_info.sql", "original_file_path": "macros/jinja_helpers/log_info.sql", "name": "log_info", "macro_sql": "{% macro log_info(message) %}\n {{ return(adapter.dispatch('log_info', 'dbt_utils')(message)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__log_info"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.87086, "supported_languages": null}, "macro.dbt_utils.default__log_info": {"unique_id": "macro.dbt_utils.default__log_info", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/jinja_helpers/log_info.sql", "original_file_path": "macros/jinja_helpers/log_info.sql", "name": "default__log_info", "macro_sql": "{% macro default__log_info(message) %}\n {{ log(dbt_utils.pretty_log_format(message), info=True) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.pretty_log_format"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.8710551, "supported_languages": null}, "macro.dbt_utils.slugify": {"unique_id": "macro.dbt_utils.slugify", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/jinja_helpers/slugify.sql", "original_file_path": "macros/jinja_helpers/slugify.sql", "name": "slugify", "macro_sql": "{% macro slugify(string) %}\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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.871758, "supported_languages": null}, "macro.dbt_utils._is_ephemeral": {"unique_id": "macro.dbt_utils._is_ephemeral", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/jinja_helpers/_is_ephemeral.sql", "original_file_path": "macros/jinja_helpers/_is_ephemeral.sql", "name": "_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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.8726752, "supported_languages": null}, "macro.dbt_utils.get_intervals_between": {"unique_id": "macro.dbt_utils.get_intervals_between", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/date_spine.sql", "original_file_path": "macros/sql/date_spine.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__get_intervals_between"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.87342, "supported_languages": null}, "macro.dbt_utils.default__get_intervals_between": {"unique_id": "macro.dbt_utils.default__get_intervals_between", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/date_spine.sql", "original_file_path": "macros/sql/date_spine.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement", "macro.dbt.datediff"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.874017, "supported_languages": null}, "macro.dbt_utils.date_spine": {"unique_id": "macro.dbt_utils.date_spine", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/date_spine.sql", "original_file_path": "macros/sql/date_spine.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__date_spine"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.87425, "supported_languages": null}, "macro.dbt_utils.default__date_spine": {"unique_id": "macro.dbt_utils.default__date_spine", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/date_spine.sql", "original_file_path": "macros/sql/date_spine.sql", "name": "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 1) - 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 %}", "resource_type": "macro", "tags": [], "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}, "patch_path": null, "arguments": [], "created_at": 1671505472.874611, "supported_languages": null}, "macro.dbt_utils.nullcheck_table": {"unique_id": "macro.dbt_utils.nullcheck_table", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/nullcheck_table.sql", "original_file_path": "macros/sql/nullcheck_table.sql", "name": "nullcheck_table", "macro_sql": "{% macro nullcheck_table(relation) %}\n {{ return(adapter.dispatch('nullcheck_table', 'dbt_utils')(relation)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__nullcheck_table"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.8750029, "supported_languages": null}, "macro.dbt_utils.default__nullcheck_table": {"unique_id": "macro.dbt_utils.default__nullcheck_table", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/nullcheck_table.sql", "original_file_path": "macros/sql/nullcheck_table.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "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}, "patch_path": null, "arguments": [], "created_at": 1671505472.875361, "supported_languages": null}, "macro.dbt_utils.get_relations_by_pattern": {"unique_id": "macro.dbt_utils.get_relations_by_pattern", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/get_relations_by_pattern.sql", "original_file_path": "macros/sql/get_relations_by_pattern.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__get_relations_by_pattern"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.876099, "supported_languages": null}, "macro.dbt_utils.default__get_relations_by_pattern": {"unique_id": "macro.dbt_utils.default__get_relations_by_pattern", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/get_relations_by_pattern.sql", "original_file_path": "macros/sql/get_relations_by_pattern.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement", "macro.dbt_utils.get_tables_by_pattern_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.877059, "supported_languages": null}, "macro.dbt_utils.get_powers_of_two": {"unique_id": "macro.dbt_utils.get_powers_of_two", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/generate_series.sql", "original_file_path": "macros/sql/generate_series.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__get_powers_of_two"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.8779461, "supported_languages": null}, "macro.dbt_utils.default__get_powers_of_two": {"unique_id": "macro.dbt_utils.default__get_powers_of_two", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/generate_series.sql", "original_file_path": "macros/sql/generate_series.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.878361, "supported_languages": null}, "macro.dbt_utils.generate_series": {"unique_id": "macro.dbt_utils.generate_series", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/generate_series.sql", "original_file_path": "macros/sql/generate_series.sql", "name": "generate_series", "macro_sql": "{% macro generate_series(upper_bound) %}\n {{ return(adapter.dispatch('generate_series', 'dbt_utils')(upper_bound)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__generate_series"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.87855, "supported_languages": null}, "macro.dbt_utils.default__generate_series": {"unique_id": "macro.dbt_utils.default__generate_series", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/generate_series.sql", "original_file_path": "macros/sql/generate_series.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.get_powers_of_two"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.879057, "supported_languages": null}, "macro.dbt_utils.get_relations_by_prefix": {"unique_id": "macro.dbt_utils.get_relations_by_prefix", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/get_relations_by_prefix.sql", "original_file_path": "macros/sql/get_relations_by_prefix.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__get_relations_by_prefix"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.879776, "supported_languages": null}, "macro.dbt_utils.default__get_relations_by_prefix": {"unique_id": "macro.dbt_utils.default__get_relations_by_prefix", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/get_relations_by_prefix.sql", "original_file_path": "macros/sql/get_relations_by_prefix.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement", "macro.dbt_utils.get_tables_by_prefix_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.880613, "supported_languages": null}, "macro.dbt_utils.get_tables_by_prefix_sql": {"unique_id": "macro.dbt_utils.get_tables_by_prefix_sql", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/get_tables_by_prefix_sql.sql", "original_file_path": "macros/sql/get_tables_by_prefix_sql.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__get_tables_by_prefix_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.8810828, "supported_languages": null}, "macro.dbt_utils.default__get_tables_by_prefix_sql": {"unique_id": "macro.dbt_utils.default__get_tables_by_prefix_sql", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/get_tables_by_prefix_sql.sql", "original_file_path": "macros/sql/get_tables_by_prefix_sql.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.get_tables_by_pattern_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.881362, "supported_languages": null}, "macro.dbt_utils.star": {"unique_id": "macro.dbt_utils.star", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/star.sql", "original_file_path": "macros/sql/star.sql", "name": "star", "macro_sql": "{% macro star(from, relation_alias=False, except=[], prefix='', suffix='', quote_identifiers=True) -%}\r\n {{ return(adapter.dispatch('star', 'dbt_utils')(from, relation_alias, except, prefix, suffix, quote_identifiers)) }}\r\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__star"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.882594, "supported_languages": null}, "macro.dbt_utils.default__star": {"unique_id": "macro.dbt_utils.default__star", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/star.sql", "original_file_path": "macros/sql/star.sql", "name": "default__star", "macro_sql": "{% macro default__star(from, relation_alias=False, except=[], prefix='', suffix='', quote_identifiers=True) -%}\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 {%- 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 }} {%- if prefix!='' or suffix!='' %} as {{ adapter.quote(prefix ~ col ~ suffix)|trim }} {%- endif -%}\r\n {%- else -%}\r\n {{ col|trim }} {%- if prefix!='' or suffix!='' %} as {{ (prefix ~ col ~ suffix)|trim }} {%- endif -%}\r\n {% endif %}\r\n {%- if not loop.last %},{{ '\\n ' }}{%- endif -%}\r\n {%- endfor -%}\r\n {% endif %}\r\n{%- endmacro %}", "resource_type": "macro", "tags": [], "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}, "patch_path": null, "arguments": [], "created_at": 1671505472.884005, "supported_languages": null}, "macro.dbt_utils.unpivot": {"unique_id": "macro.dbt_utils.unpivot", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/unpivot.sql", "original_file_path": "macros/sql/unpivot.sql", "name": "unpivot", "macro_sql": "{% macro unpivot(relation=none, cast_to='varchar', exclude=none, remove=none, field_name='field_name', value_name='value') -%}\n {{ return(adapter.dispatch('unpivot', 'dbt_utils')(relation, cast_to, exclude, remove, field_name, value_name)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__unpivot"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.885422, "supported_languages": null}, "macro.dbt_utils.default__unpivot": {"unique_id": "macro.dbt_utils.default__unpivot", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/unpivot.sql", "original_file_path": "macros/sql/unpivot.sql", "name": "default__unpivot", "macro_sql": "{% macro default__unpivot(relation=none, cast_to='varchar', exclude=none, remove=none, field_name='field_name', value_name='value') -%}\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 select\n {%- for exclude_col in exclude %}\n {{ exclude_col }},\n {%- endfor %}\n\n cast('{{ col.column }}' as {{ dbt.type_string() }}) as {{ field_name }},\n cast( {% if col.data_type == 'boolean' %}\n {{ dbt.cast_bool_to_text(col.column) }}\n {% else %}\n {{ col.column }}\n {% endif %}\n as {{ cast_to }}) as {{ value_name }}\n\n from {{ relation }}\n\n {% if not loop.last -%}\n union all\n {% endif -%}\n {%- endfor -%}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "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}, "patch_path": null, "arguments": [], "created_at": 1671505472.887095, "supported_languages": null}, "macro.dbt_utils.safe_divide": {"unique_id": "macro.dbt_utils.safe_divide", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/safe_divide.sql", "original_file_path": "macros/sql/safe_divide.sql", "name": "safe_divide", "macro_sql": "{% macro safe_divide(numerator, denominator) -%}\n {{ return(adapter.dispatch('safe_divide', 'dbt_utils')(numerator, denominator)) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__safe_divide"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.887517, "supported_languages": null}, "macro.dbt_utils.default__safe_divide": {"unique_id": "macro.dbt_utils.default__safe_divide", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/safe_divide.sql", "original_file_path": "macros/sql/safe_divide.sql", "name": "default__safe_divide", "macro_sql": "{% macro default__safe_divide(numerator, denominator) %}\n ( {{ numerator }} ) / nullif( ( {{ denominator }} ), 0)\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.8876538, "supported_languages": null}, "macro.dbt_utils.union_relations": {"unique_id": "macro.dbt_utils.union_relations", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/union.sql", "original_file_path": "macros/sql/union.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__union_relations"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.890614, "supported_languages": null}, "macro.dbt_utils.default__union_relations": {"unique_id": "macro.dbt_utils.default__union_relations", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/union.sql", "original_file_path": "macros/sql/union.sql", "name": "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) }} 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 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 -%}", "resource_type": "macro", "tags": [], "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}, "patch_path": null, "arguments": [], "created_at": 1671505472.894018, "supported_languages": null}, "macro.dbt_utils.group_by": {"unique_id": "macro.dbt_utils.group_by", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/groupby.sql", "original_file_path": "macros/sql/groupby.sql", "name": "group_by", "macro_sql": "{%- macro group_by(n) -%}\n {{ return(adapter.dispatch('group_by', 'dbt_utils')(n)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__group_by"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.894419, "supported_languages": null}, "macro.dbt_utils.default__group_by": {"unique_id": "macro.dbt_utils.default__group_by", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/groupby.sql", "original_file_path": "macros/sql/groupby.sql", "name": "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 -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.894677, "supported_languages": null}, "macro.dbt_utils.deduplicate": {"unique_id": "macro.dbt_utils.deduplicate", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/deduplicate.sql", "original_file_path": "macros/sql/deduplicate.sql", "name": "deduplicate", "macro_sql": "{%- macro deduplicate(relation, partition_by, order_by) -%}\n {{ return(adapter.dispatch('deduplicate', 'dbt_utils')(relation, partition_by, order_by)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.postgres__deduplicate"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.895527, "supported_languages": null}, "macro.dbt_utils.default__deduplicate": {"unique_id": "macro.dbt_utils.default__deduplicate", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/deduplicate.sql", "original_file_path": "macros/sql/deduplicate.sql", "name": "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", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.895746, "supported_languages": null}, "macro.dbt_utils.redshift__deduplicate": {"unique_id": "macro.dbt_utils.redshift__deduplicate", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/deduplicate.sql", "original_file_path": "macros/sql/deduplicate.sql", "name": "redshift__deduplicate", "macro_sql": "{% macro redshift__deduplicate(relation, partition_by, order_by) -%}\n\n {{ return(dbt_utils.default__deduplicate(relation, partition_by, order_by=order_by)) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__deduplicate"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.895945, "supported_languages": null}, "macro.dbt_utils.postgres__deduplicate": {"unique_id": "macro.dbt_utils.postgres__deduplicate", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/deduplicate.sql", "original_file_path": "macros/sql/deduplicate.sql", "name": "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", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.896137, "supported_languages": null}, "macro.dbt_utils.snowflake__deduplicate": {"unique_id": "macro.dbt_utils.snowflake__deduplicate", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/deduplicate.sql", "original_file_path": "macros/sql/deduplicate.sql", "name": "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", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.8963, "supported_languages": null}, "macro.dbt_utils.bigquery__deduplicate": {"unique_id": "macro.dbt_utils.bigquery__deduplicate", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/deduplicate.sql", "original_file_path": "macros/sql/deduplicate.sql", "name": "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 -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.896466, "supported_languages": null}, "macro.dbt_utils.surrogate_key": {"unique_id": "macro.dbt_utils.surrogate_key", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/surrogate_key.sql", "original_file_path": "macros/sql/surrogate_key.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__surrogate_key"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.896925, "supported_languages": null}, "macro.dbt_utils.default__surrogate_key": {"unique_id": "macro.dbt_utils.default__surrogate_key", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/surrogate_key.sql", "original_file_path": "macros/sql/surrogate_key.sql", "name": "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 -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.897161, "supported_languages": null}, "macro.dbt_utils.safe_add": {"unique_id": "macro.dbt_utils.safe_add", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/safe_add.sql", "original_file_path": "macros/sql/safe_add.sql", "name": "safe_add", "macro_sql": "{%- macro safe_add(field_list) -%}\n {{ return(adapter.dispatch('safe_add', 'dbt_utils')(field_list)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__safe_add"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.897596, "supported_languages": null}, "macro.dbt_utils.default__safe_add": {"unique_id": "macro.dbt_utils.default__safe_add", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/safe_add.sql", "original_file_path": "macros/sql/safe_add.sql", "name": "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 -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.8981252, "supported_languages": null}, "macro.dbt_utils.nullcheck": {"unique_id": "macro.dbt_utils.nullcheck", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/nullcheck.sql", "original_file_path": "macros/sql/nullcheck.sql", "name": "nullcheck", "macro_sql": "{% macro nullcheck(cols) %}\n {{ return(adapter.dispatch('nullcheck', 'dbt_utils')(cols)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__nullcheck"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.8985229, "supported_languages": null}, "macro.dbt_utils.default__nullcheck": {"unique_id": "macro.dbt_utils.default__nullcheck", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/nullcheck.sql", "original_file_path": "macros/sql/nullcheck.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.898845, "supported_languages": null}, "macro.dbt_utils.get_tables_by_pattern_sql": {"unique_id": "macro.dbt_utils.get_tables_by_pattern_sql", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/get_tables_by_pattern_sql.sql", "original_file_path": "macros/sql/get_tables_by_pattern_sql.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__get_tables_by_pattern_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.900465, "supported_languages": null}, "macro.dbt_utils.default__get_tables_by_pattern_sql": {"unique_id": "macro.dbt_utils.default__get_tables_by_pattern_sql", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/get_tables_by_pattern_sql.sql", "original_file_path": "macros/sql/get_tables_by_pattern_sql.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.get_table_types_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.900816, "supported_languages": null}, "macro.dbt_utils.bigquery__get_tables_by_pattern_sql": {"unique_id": "macro.dbt_utils.bigquery__get_tables_by_pattern_sql", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/get_tables_by_pattern_sql.sql", "original_file_path": "macros/sql/get_tables_by_pattern_sql.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "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}, "patch_path": null, "arguments": [], "created_at": 1671505472.9015949, "supported_languages": null}, "macro.dbt_utils._bigquery__get_matching_schemata": {"unique_id": "macro.dbt_utils._bigquery__get_matching_schemata", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/get_tables_by_pattern_sql.sql", "original_file_path": "macros/sql/get_tables_by_pattern_sql.sql", "name": "_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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.902101, "supported_languages": null}, "macro.dbt_utils.get_column_values": {"unique_id": "macro.dbt_utils.get_column_values", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/get_column_values.sql", "original_file_path": "macros/sql/get_column_values.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__get_column_values"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.9032252, "supported_languages": null}, "macro.dbt_utils.default__get_column_values": {"unique_id": "macro.dbt_utils.default__get_column_values", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/get_column_values.sql", "original_file_path": "macros/sql/get_column_values.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils._is_ephemeral", "macro.dbt.load_relation", "macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.904717, "supported_languages": null}, "macro.dbt_utils.pivot": {"unique_id": "macro.dbt_utils.pivot", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/pivot.sql", "original_file_path": "macros/sql/pivot.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__pivot"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.905799, "supported_languages": null}, "macro.dbt_utils.default__pivot": {"unique_id": "macro.dbt_utils.default__pivot", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/pivot.sql", "original_file_path": "macros/sql/pivot.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.escape_single_quotes", "macro.dbt_utils.slugify"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.906625, "supported_languages": null}, "macro.dbt_utils.get_filtered_columns_in_relation": {"unique_id": "macro.dbt_utils.get_filtered_columns_in_relation", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/get_filtered_columns_in_relation.sql", "original_file_path": "macros/sql/get_filtered_columns_in_relation.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__get_filtered_columns_in_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.907156, "supported_languages": null}, "macro.dbt_utils.default__get_filtered_columns_in_relation": {"unique_id": "macro.dbt_utils.default__get_filtered_columns_in_relation", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/get_filtered_columns_in_relation.sql", "original_file_path": "macros/sql/get_filtered_columns_in_relation.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils._is_relation", "macro.dbt_utils._is_ephemeral"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.907873, "supported_languages": null}, "macro.dbt_utils.width_bucket": {"unique_id": "macro.dbt_utils.width_bucket", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/width_bucket.sql", "original_file_path": "macros/sql/width_bucket.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__width_bucket"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.909287, "supported_languages": null}, "macro.dbt_utils.default__width_bucket": {"unique_id": "macro.dbt_utils.default__width_bucket", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/width_bucket.sql", "original_file_path": "macros/sql/width_bucket.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.safe_cast", "macro.dbt.type_numeric"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.909745, "supported_languages": null}, "macro.dbt_utils.redshift__width_bucket": {"unique_id": "macro.dbt_utils.redshift__width_bucket", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/width_bucket.sql", "original_file_path": "macros/sql/width_bucket.sql", "name": "redshift__width_bucket", "macro_sql": "{% macro redshift__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 exactly at the bucket edge\n case\n when\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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.safe_cast", "macro.dbt.type_numeric"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.910211, "supported_languages": null}, "macro.dbt_utils.snowflake__width_bucket": {"unique_id": "macro.dbt_utils.snowflake__width_bucket", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/width_bucket.sql", "original_file_path": "macros/sql/width_bucket.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.9103968, "supported_languages": null}, "macro.dbt_utils.get_query_results_as_dict": {"unique_id": "macro.dbt_utils.get_query_results_as_dict", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/get_query_results_as_dict.sql", "original_file_path": "macros/sql/get_query_results_as_dict.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__get_query_results_as_dict"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.91084, "supported_languages": null}, "macro.dbt_utils.default__get_query_results_as_dict": {"unique_id": "macro.dbt_utils.default__get_query_results_as_dict", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/get_query_results_as_dict.sql", "original_file_path": "macros/sql/get_query_results_as_dict.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.911424, "supported_languages": null}, "macro.dbt_utils.generate_surrogate_key": {"unique_id": "macro.dbt_utils.generate_surrogate_key", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/generate_surrogate_key.sql", "original_file_path": "macros/sql/generate_surrogate_key.sql", "name": "generate_surrogate_key", "macro_sql": "{%- macro generate_surrogate_key(field_list) -%}\n {{ return(adapter.dispatch('generate_surrogate_key', 'dbt_utils')(field_list)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__generate_surrogate_key"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.911933, "supported_languages": null}, "macro.dbt_utils.default__generate_surrogate_key": {"unique_id": "macro.dbt_utils.default__generate_surrogate_key", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/generate_surrogate_key.sql", "original_file_path": "macros/sql/generate_surrogate_key.sql", "name": "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 -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.type_string", "macro.dbt.hash", "macro.dbt.concat"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.9125671, "supported_languages": null}, "macro.dbt_utils.get_table_types_sql": {"unique_id": "macro.dbt_utils.get_table_types_sql", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/get_table_types_sql.sql", "original_file_path": "macros/sql/get_table_types_sql.sql", "name": "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", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.postgres__get_table_types_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.913023, "supported_languages": null}, "macro.dbt_utils.default__get_table_types_sql": {"unique_id": "macro.dbt_utils.default__get_table_types_sql", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/get_table_types_sql.sql", "original_file_path": "macros/sql/get_table_types_sql.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.9131641, "supported_languages": null}, "macro.dbt_utils.postgres__get_table_types_sql": {"unique_id": "macro.dbt_utils.postgres__get_table_types_sql", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/get_table_types_sql.sql", "original_file_path": "macros/sql/get_table_types_sql.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.9132988, "supported_languages": null}, "macro.dbt_utils.get_single_value": {"unique_id": "macro.dbt_utils.get_single_value", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/get_single_value.sql", "original_file_path": "macros/sql/get_single_value.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__get_single_value"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.913861, "supported_languages": null}, "macro.dbt_utils.default__get_single_value": {"unique_id": "macro.dbt_utils.default__get_single_value", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/get_single_value.sql", "original_file_path": "macros/sql/get_single_value.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.9146612, "supported_languages": null}, "macro.dbt_utils.degrees_to_radians": {"unique_id": "macro.dbt_utils.degrees_to_radians", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/haversine_distance.sql", "original_file_path": "macros/sql/haversine_distance.sql", "name": "degrees_to_radians", "macro_sql": "{% macro degrees_to_radians(degrees) -%}\n acos(-1) * {{degrees}} / 180\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.915732, "supported_languages": null}, "macro.dbt_utils.haversine_distance": {"unique_id": "macro.dbt_utils.haversine_distance", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/haversine_distance.sql", "original_file_path": "macros/sql/haversine_distance.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.default__haversine_distance"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.916003, "supported_languages": null}, "macro.dbt_utils.default__haversine_distance": {"unique_id": "macro.dbt_utils.default__haversine_distance", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/haversine_distance.sql", "original_file_path": "macros/sql/haversine_distance.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.9165592, "supported_languages": null}, "macro.dbt_utils.bigquery__haversine_distance": {"unique_id": "macro.dbt_utils.bigquery__haversine_distance", "package_name": "dbt_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/dbt_utils", "path": "macros/sql/haversine_distance.sql", "original_file_path": "macros/sql/haversine_distance.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.degrees_to_radians"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.917342, "supported_languages": null}, "macro.spark_utils.get_tables": {"unique_id": "macro.spark_utils.get_tables", "package_name": "spark_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/spark_utils", "path": "macros/maintenance_operation.sql", "original_file_path": "macros/maintenance_operation.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.9222422, "supported_languages": null}, "macro.spark_utils.get_delta_tables": {"unique_id": "macro.spark_utils.get_delta_tables", "package_name": "spark_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/spark_utils", "path": "macros/maintenance_operation.sql", "original_file_path": "macros/maintenance_operation.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.spark_utils.get_tables", "macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.922922, "supported_languages": null}, "macro.spark_utils.get_statistic_columns": {"unique_id": "macro.spark_utils.get_statistic_columns", "package_name": "spark_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/spark_utils", "path": "macros/maintenance_operation.sql", "original_file_path": "macros/maintenance_operation.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.9237819, "supported_languages": null}, "macro.spark_utils.spark_optimize_delta_tables": {"unique_id": "macro.spark_utils.spark_optimize_delta_tables", "package_name": "spark_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/spark_utils", "path": "macros/maintenance_operation.sql", "original_file_path": "macros/maintenance_operation.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "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}, "patch_path": null, "arguments": [], "created_at": 1671505472.9244978, "supported_languages": null}, "macro.spark_utils.spark_vacuum_delta_tables": {"unique_id": "macro.spark_utils.spark_vacuum_delta_tables", "package_name": "spark_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/spark_utils", "path": "macros/maintenance_operation.sql", "original_file_path": "macros/maintenance_operation.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "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}, "patch_path": null, "arguments": [], "created_at": 1671505472.9252071, "supported_languages": null}, "macro.spark_utils.spark_analyze_tables": {"unique_id": "macro.spark_utils.spark_analyze_tables", "package_name": "spark_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/spark_utils", "path": "macros/maintenance_operation.sql", "original_file_path": "macros/maintenance_operation.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "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}, "patch_path": null, "arguments": [], "created_at": 1671505472.926147, "supported_languages": null}, "macro.spark_utils.spark__concat": {"unique_id": "macro.spark_utils.spark__concat", "package_name": "spark_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/spark_utils", "path": "macros/dbt_utils/cross_db_utils/concat.sql", "original_file_path": "macros/dbt_utils/cross_db_utils/concat.sql", "name": "spark__concat", "macro_sql": "{% macro spark__concat(fields) -%}\n concat({{ fields|join(', ') }})\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.92642, "supported_languages": null}, "macro.spark_utils.spark__type_numeric": {"unique_id": "macro.spark_utils.spark__type_numeric", "package_name": "spark_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/spark_utils", "path": "macros/dbt_utils/cross_db_utils/datatypes.sql", "original_file_path": "macros/dbt_utils/cross_db_utils/datatypes.sql", "name": "spark__type_numeric", "macro_sql": "{% macro spark__type_numeric() %}\n decimal(28, 6)\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.9265978, "supported_languages": null}, "macro.spark_utils.spark__dateadd": {"unique_id": "macro.spark_utils.spark__dateadd", "package_name": "spark_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/spark_utils", "path": "macros/dbt_utils/cross_db_utils/dateadd.sql", "original_file_path": "macros/dbt_utils/cross_db_utils/dateadd.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.spark_utils.assert_not_null"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.929342, "supported_languages": null}, "macro.spark_utils.spark__datediff": {"unique_id": "macro.spark_utils.spark__datediff", "package_name": "spark_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/spark_utils", "path": "macros/dbt_utils/cross_db_utils/datediff.sql", "original_file_path": "macros/dbt_utils/cross_db_utils/datediff.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.spark_utils.assert_not_null"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.936497, "supported_languages": null}, "macro.spark_utils.spark__current_timestamp": {"unique_id": "macro.spark_utils.spark__current_timestamp", "package_name": "spark_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/spark_utils", "path": "macros/dbt_utils/cross_db_utils/current_timestamp.sql", "original_file_path": "macros/dbt_utils/cross_db_utils/current_timestamp.sql", "name": "spark__current_timestamp", "macro_sql": "{% macro spark__current_timestamp() %}\n current_timestamp()\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.9367979, "supported_languages": null}, "macro.spark_utils.spark__current_timestamp_in_utc": {"unique_id": "macro.spark_utils.spark__current_timestamp_in_utc", "package_name": "spark_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/spark_utils", "path": "macros/dbt_utils/cross_db_utils/current_timestamp.sql", "original_file_path": "macros/dbt_utils/cross_db_utils/current_timestamp.sql", "name": "spark__current_timestamp_in_utc", "macro_sql": "{% macro spark__current_timestamp_in_utc() %}\n unix_timestamp()\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.93688, "supported_languages": null}, "macro.spark_utils.spark__split_part": {"unique_id": "macro.spark_utils.spark__split_part", "package_name": "spark_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/spark_utils", "path": "macros/dbt_utils/cross_db_utils/split_part.sql", "original_file_path": "macros/dbt_utils/cross_db_utils/split_part.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.937541, "supported_languages": null}, "macro.spark_utils.spark__get_relations_by_pattern": {"unique_id": "macro.spark_utils.spark__get_relations_by_pattern", "package_name": "spark_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/spark_utils", "path": "macros/dbt_utils/sql/get_relations_by_prefix.sql", "original_file_path": "macros/dbt_utils/sql/get_relations_by_prefix.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.9391842, "supported_languages": null}, "macro.spark_utils.spark__get_relations_by_prefix": {"unique_id": "macro.spark_utils.spark__get_relations_by_prefix", "package_name": "spark_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/spark_utils", "path": "macros/dbt_utils/sql/get_relations_by_prefix.sql", "original_file_path": "macros/dbt_utils/sql/get_relations_by_prefix.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.spark_utils.spark__get_relations_by_pattern"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.939532, "supported_languages": null}, "macro.spark_utils.spark__get_tables_by_pattern": {"unique_id": "macro.spark_utils.spark__get_tables_by_pattern", "package_name": "spark_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/spark_utils", "path": "macros/dbt_utils/sql/get_relations_by_prefix.sql", "original_file_path": "macros/dbt_utils/sql/get_relations_by_prefix.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.spark_utils.spark__get_relations_by_pattern"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.939811, "supported_languages": null}, "macro.spark_utils.spark__get_tables_by_prefix": {"unique_id": "macro.spark_utils.spark__get_tables_by_prefix", "package_name": "spark_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/spark_utils", "path": "macros/dbt_utils/sql/get_relations_by_prefix.sql", "original_file_path": "macros/dbt_utils/sql/get_relations_by_prefix.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.spark_utils.spark__get_relations_by_prefix"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.9400861, "supported_languages": null}, "macro.spark_utils.assert_not_null": {"unique_id": "macro.spark_utils.assert_not_null", "package_name": "spark_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/spark_utils", "path": "macros/etc/assert_not_null.sql", "original_file_path": "macros/etc/assert_not_null.sql", "name": "assert_not_null", "macro_sql": "{% macro assert_not_null(function, arg) -%}\n {{ return(adapter.dispatch('assert_not_null', 'spark_utils')(function, arg)) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.spark_utils.default__assert_not_null"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.940492, "supported_languages": null}, "macro.spark_utils.default__assert_not_null": {"unique_id": "macro.spark_utils.default__assert_not_null", "package_name": "spark_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/spark_utils", "path": "macros/etc/assert_not_null.sql", "original_file_path": "macros/etc/assert_not_null.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.940691, "supported_languages": null}, "macro.spark_utils.spark__convert_timezone": {"unique_id": "macro.spark_utils.spark__convert_timezone", "package_name": "spark_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/spark_utils", "path": "macros/snowplow/convert_timezone.sql", "original_file_path": "macros/snowplow/convert_timezone.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.940971, "supported_languages": null}, "macro.fivetran_utils.enabled_vars": {"unique_id": "macro.fivetran_utils.enabled_vars", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/enabled_vars.sql", "original_file_path": "macros/enabled_vars.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.941451, "supported_languages": null}, "macro.fivetran_utils.percentile": {"unique_id": "macro.fivetran_utils.percentile", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/percentile.sql", "original_file_path": "macros/percentile.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.fivetran_utils.postgres__percentile"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.94244, "supported_languages": null}, "macro.fivetran_utils.default__percentile": {"unique_id": "macro.fivetran_utils.default__percentile", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/percentile.sql", "original_file_path": "macros/percentile.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.9426072, "supported_languages": null}, "macro.fivetran_utils.redshift__percentile": {"unique_id": "macro.fivetran_utils.redshift__percentile", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/percentile.sql", "original_file_path": "macros/percentile.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.942768, "supported_languages": null}, "macro.fivetran_utils.bigquery__percentile": {"unique_id": "macro.fivetran_utils.bigquery__percentile", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/percentile.sql", "original_file_path": "macros/percentile.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.9429278, "supported_languages": null}, "macro.fivetran_utils.postgres__percentile": {"unique_id": "macro.fivetran_utils.postgres__percentile", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/percentile.sql", "original_file_path": "macros/percentile.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.9430752, "supported_languages": null}, "macro.fivetran_utils.spark__percentile": {"unique_id": "macro.fivetran_utils.spark__percentile", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/percentile.sql", "original_file_path": "macros/percentile.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.94324, "supported_languages": null}, "macro.fivetran_utils.pivot_json_extract": {"unique_id": "macro.fivetran_utils.pivot_json_extract", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/pivot_json_extract.sql", "original_file_path": "macros/pivot_json_extract.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.fivetran_utils.json_extract"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.944232, "supported_languages": null}, "macro.fivetran_utils.persist_pass_through_columns": {"unique_id": "macro.fivetran_utils.persist_pass_through_columns", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/persist_pass_through_columns.sql", "original_file_path": "macros/persist_pass_through_columns.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.944962, "supported_languages": null}, "macro.fivetran_utils.json_parse": {"unique_id": "macro.fivetran_utils.json_parse", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/json_parse.sql", "original_file_path": "macros/json_parse.sql", "name": "json_parse", "macro_sql": "{% macro json_parse(string, string_path) -%}\n\n{{ adapter.dispatch('json_parse', 'fivetran_utils') (string, string_path) }}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.fivetran_utils.postgres__json_parse"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.9460638, "supported_languages": null}, "macro.fivetran_utils.default__json_parse": {"unique_id": "macro.fivetran_utils.default__json_parse", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/json_parse.sql", "original_file_path": "macros/json_parse.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.9463081, "supported_languages": null}, "macro.fivetran_utils.redshift__json_parse": {"unique_id": "macro.fivetran_utils.redshift__json_parse", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/json_parse.sql", "original_file_path": "macros/json_parse.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.946552, "supported_languages": null}, "macro.fivetran_utils.bigquery__json_parse": {"unique_id": "macro.fivetran_utils.bigquery__json_parse", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/json_parse.sql", "original_file_path": "macros/json_parse.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.946787, "supported_languages": null}, "macro.fivetran_utils.postgres__json_parse": {"unique_id": "macro.fivetran_utils.postgres__json_parse", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/json_parse.sql", "original_file_path": "macros/json_parse.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.947021, "supported_languages": null}, "macro.fivetran_utils.snowflake__json_parse": {"unique_id": "macro.fivetran_utils.snowflake__json_parse", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/json_parse.sql", "original_file_path": "macros/json_parse.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.947283, "supported_languages": null}, "macro.fivetran_utils.spark__json_parse": {"unique_id": "macro.fivetran_utils.spark__json_parse", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/json_parse.sql", "original_file_path": "macros/json_parse.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.9475992, "supported_languages": null}, "macro.fivetran_utils.max_bool": {"unique_id": "macro.fivetran_utils.max_bool", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/max_bool.sql", "original_file_path": "macros/max_bool.sql", "name": "max_bool", "macro_sql": "{% macro max_bool(boolean_field) -%}\n\n{{ adapter.dispatch('max_bool', 'fivetran_utils') (boolean_field) }}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.fivetran_utils.default__max_bool"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.948045, "supported_languages": null}, "macro.fivetran_utils.default__max_bool": {"unique_id": "macro.fivetran_utils.default__max_bool", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/max_bool.sql", "original_file_path": "macros/max_bool.sql", "name": "default__max_bool", "macro_sql": "{% macro default__max_bool(boolean_field) %}\n\n bool_or( {{ boolean_field }} )\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.94816, "supported_languages": null}, "macro.fivetran_utils.snowflake__max_bool": {"unique_id": "macro.fivetran_utils.snowflake__max_bool", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/max_bool.sql", "original_file_path": "macros/max_bool.sql", "name": "snowflake__max_bool", "macro_sql": "{% macro snowflake__max_bool(boolean_field) %}\n\n max( {{ boolean_field }} )\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.948264, "supported_languages": null}, "macro.fivetran_utils.bigquery__max_bool": {"unique_id": "macro.fivetran_utils.bigquery__max_bool", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/max_bool.sql", "original_file_path": "macros/max_bool.sql", "name": "bigquery__max_bool", "macro_sql": "{% macro bigquery__max_bool(boolean_field) %}\n\n max( {{ boolean_field }} )\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.948367, "supported_languages": null}, "macro.fivetran_utils.calculated_fields": {"unique_id": "macro.fivetran_utils.calculated_fields", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/calculated_fields.sql", "original_file_path": "macros/calculated_fields.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.948844, "supported_languages": null}, "macro.fivetran_utils.seed_data_helper": {"unique_id": "macro.fivetran_utils.seed_data_helper", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/seed_data_helper.sql", "original_file_path": "macros/seed_data_helper.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.949506, "supported_languages": null}, "macro.fivetran_utils.fill_pass_through_columns": {"unique_id": "macro.fivetran_utils.fill_pass_through_columns", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/fill_pass_through_columns.sql", "original_file_path": "macros/fill_pass_through_columns.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.9503438, "supported_languages": null}, "macro.fivetran_utils.string_agg": {"unique_id": "macro.fivetran_utils.string_agg", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/string_agg.sql", "original_file_path": "macros/string_agg.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.fivetran_utils.default__string_agg"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.950881, "supported_languages": null}, "macro.fivetran_utils.default__string_agg": {"unique_id": "macro.fivetran_utils.default__string_agg", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/string_agg.sql", "original_file_path": "macros/string_agg.sql", "name": "default__string_agg", "macro_sql": "{% macro default__string_agg(field_to_agg, delimiter) %}\n string_agg({{ field_to_agg }}, {{ delimiter }})\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.951013, "supported_languages": null}, "macro.fivetran_utils.snowflake__string_agg": {"unique_id": "macro.fivetran_utils.snowflake__string_agg", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/string_agg.sql", "original_file_path": "macros/string_agg.sql", "name": "snowflake__string_agg", "macro_sql": "{% macro snowflake__string_agg(field_to_agg, delimiter) %}\n listagg({{ field_to_agg }}, {{ delimiter }})\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.9511418, "supported_languages": null}, "macro.fivetran_utils.redshift__string_agg": {"unique_id": "macro.fivetran_utils.redshift__string_agg", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/string_agg.sql", "original_file_path": "macros/string_agg.sql", "name": "redshift__string_agg", "macro_sql": "{% macro redshift__string_agg(field_to_agg, delimiter) %}\n listagg({{ field_to_agg }}, {{ delimiter }})\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.9512808, "supported_languages": null}, "macro.fivetran_utils.spark__string_agg": {"unique_id": "macro.fivetran_utils.spark__string_agg", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/string_agg.sql", "original_file_path": "macros/string_agg.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.9516811, "supported_languages": null}, "macro.fivetran_utils.timestamp_diff": {"unique_id": "macro.fivetran_utils.timestamp_diff", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/timestamp_diff.sql", "original_file_path": "macros/timestamp_diff.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.fivetran_utils.postgres__timestamp_diff"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.954475, "supported_languages": null}, "macro.fivetran_utils.default__timestamp_diff": {"unique_id": "macro.fivetran_utils.default__timestamp_diff", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/timestamp_diff.sql", "original_file_path": "macros/timestamp_diff.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.95464, "supported_languages": null}, "macro.fivetran_utils.redshift__timestamp_diff": {"unique_id": "macro.fivetran_utils.redshift__timestamp_diff", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/timestamp_diff.sql", "original_file_path": "macros/timestamp_diff.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.9547951, "supported_languages": null}, "macro.fivetran_utils.bigquery__timestamp_diff": {"unique_id": "macro.fivetran_utils.bigquery__timestamp_diff", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/timestamp_diff.sql", "original_file_path": "macros/timestamp_diff.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.954944, "supported_languages": null}, "macro.fivetran_utils.postgres__timestamp_diff": {"unique_id": "macro.fivetran_utils.postgres__timestamp_diff", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/timestamp_diff.sql", "original_file_path": "macros/timestamp_diff.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.datediff"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.956598, "supported_languages": null}, "macro.fivetran_utils.try_cast": {"unique_id": "macro.fivetran_utils.try_cast", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/try_cast.sql", "original_file_path": "macros/try_cast.sql", "name": "try_cast", "macro_sql": "{% macro try_cast(field, type) %}\n {{ adapter.dispatch('try_cast', 'fivetran_utils') (field, type) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.fivetran_utils.postgres__try_cast"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.957501, "supported_languages": null}, "macro.fivetran_utils.default__safe_cast": {"unique_id": "macro.fivetran_utils.default__safe_cast", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/try_cast.sql", "original_file_path": "macros/try_cast.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.957647, "supported_languages": null}, "macro.fivetran_utils.redshift__try_cast": {"unique_id": "macro.fivetran_utils.redshift__try_cast", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/try_cast.sql", "original_file_path": "macros/try_cast.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.9579232, "supported_languages": null}, "macro.fivetran_utils.postgres__try_cast": {"unique_id": "macro.fivetran_utils.postgres__try_cast", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/try_cast.sql", "original_file_path": "macros/try_cast.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.958209, "supported_languages": null}, "macro.fivetran_utils.snowflake__try_cast": {"unique_id": "macro.fivetran_utils.snowflake__try_cast", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/try_cast.sql", "original_file_path": "macros/try_cast.sql", "name": "snowflake__try_cast", "macro_sql": "{% macro snowflake__try_cast(field, type) %}\n try_cast(cast({{field}} as varchar) as {{type}})\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.958339, "supported_languages": null}, "macro.fivetran_utils.bigquery__try_cast": {"unique_id": "macro.fivetran_utils.bigquery__try_cast", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/try_cast.sql", "original_file_path": "macros/try_cast.sql", "name": "bigquery__try_cast", "macro_sql": "{% macro bigquery__try_cast(field, type) %}\n safe_cast({{field}} as {{type}})\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.958463, "supported_languages": null}, "macro.fivetran_utils.spark__try_cast": {"unique_id": "macro.fivetran_utils.spark__try_cast", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/try_cast.sql", "original_file_path": "macros/try_cast.sql", "name": "spark__try_cast", "macro_sql": "{% macro spark__try_cast(field, type) %}\n try_cast({{field}} as {{type}})\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.958585, "supported_languages": null}, "macro.fivetran_utils.source_relation": {"unique_id": "macro.fivetran_utils.source_relation", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/source_relation.sql", "original_file_path": "macros/source_relation.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.fivetran_utils.default__source_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.959127, "supported_languages": null}, "macro.fivetran_utils.default__source_relation": {"unique_id": "macro.fivetran_utils.default__source_relation", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/source_relation.sql", "original_file_path": "macros/source_relation.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.959779, "supported_languages": null}, "macro.fivetran_utils.first_value": {"unique_id": "macro.fivetran_utils.first_value", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/first_value.sql", "original_file_path": "macros/first_value.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.fivetran_utils.default__first_value"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.960432, "supported_languages": null}, "macro.fivetran_utils.default__first_value": {"unique_id": "macro.fivetran_utils.default__first_value", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/first_value.sql", "original_file_path": "macros/first_value.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.960651, "supported_languages": null}, "macro.fivetran_utils.redshift__first_value": {"unique_id": "macro.fivetran_utils.redshift__first_value", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/first_value.sql", "original_file_path": "macros/first_value.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.960875, "supported_languages": null}, "macro.fivetran_utils.add_dbt_source_relation": {"unique_id": "macro.fivetran_utils.add_dbt_source_relation", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/add_dbt_source_relation.sql", "original_file_path": "macros/add_dbt_source_relation.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.961235, "supported_languages": null}, "macro.fivetran_utils.add_pass_through_columns": {"unique_id": "macro.fivetran_utils.add_pass_through_columns", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/add_pass_through_columns.sql", "original_file_path": "macros/add_pass_through_columns.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.962492, "supported_languages": null}, "macro.fivetran_utils.union_relations": {"unique_id": "macro.fivetran_utils.union_relations", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/union_relations.sql", "original_file_path": "macros/union_relations.sql", "name": "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", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils._is_relation", "macro.dbt.string_literal", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.966435, "supported_languages": null}, "macro.fivetran_utils.union_tables": {"unique_id": "macro.fivetran_utils.union_tables", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/union_relations.sql", "original_file_path": "macros/union_relations.sql", "name": "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 -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.union_relations"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.9668102, "supported_languages": null}, "macro.fivetran_utils.snowflake_seed_data": {"unique_id": "macro.fivetran_utils.snowflake_seed_data", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/snowflake_seed_data.sql", "original_file_path": "macros/snowflake_seed_data.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.967284, "supported_languages": null}, "macro.fivetran_utils.fill_staging_columns": {"unique_id": "macro.fivetran_utils.fill_staging_columns", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/fill_staging_columns.sql", "original_file_path": "macros/fill_staging_columns.sql", "name": "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\n{%- for column in staging_columns %}\n {% if column.name|lower in source_column_names -%}\n {{ fivetran_utils.quote_column(column) }} as \n {%- if 'alias' in column %} {{ column.alias }} {% else %} {{ fivetran_utils.quote_column(column) }} {%- endif -%}\n {%- else -%}\n cast(null as {{ column.datatype }})\n {%- if 'alias' in column %} as {{ column.alias }} {% else %} as {{ fivetran_utils.quote_column(column) }} {% endif -%}\n {%- endif -%}\n {%- if not loop.last -%} , {% endif -%}\n{% endfor %}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.fivetran_utils.quote_column"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.968883, "supported_languages": null}, "macro.fivetran_utils.quote_column": {"unique_id": "macro.fivetran_utils.quote_column", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/fill_staging_columns.sql", "original_file_path": "macros/fill_staging_columns.sql", "name": "quote_column", "macro_sql": "{% macro quote_column(column) %}\n {% if 'quote' in column %}\n {% if column.quote %}\n {% if target.type in ('bigquery', 'spark') %}\n `{{ column.name }}`\n {% elif target.type == 'snowflake' %}\n \"{{ column.name | upper }}\"\n {% else %}\n \"{{ column.name }}\"\n {% endif %}\n {% else %}\n {{ column.name }}\n {% endif %}\n {% else %}\n {{ column.name }}\n {% endif %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.969453, "supported_languages": null}, "macro.fivetran_utils.json_extract": {"unique_id": "macro.fivetran_utils.json_extract", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/json_extract.sql", "original_file_path": "macros/json_extract.sql", "name": "json_extract", "macro_sql": "{% macro json_extract(string, string_path) -%}\n\n{{ adapter.dispatch('json_extract', 'fivetran_utils') (string, string_path) }}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.fivetran_utils.postgres__json_extract"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.9701319, "supported_languages": null}, "macro.fivetran_utils.default__json_extract": {"unique_id": "macro.fivetran_utils.default__json_extract", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/json_extract.sql", "original_file_path": "macros/json_extract.sql", "name": "default__json_extract", "macro_sql": "{% macro default__json_extract(string, string_path) %}\n\n json_extract_path_text({{string}}, {{ \"'\" ~ string_path ~ \"'\" }} )\n \n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.970294, "supported_languages": null}, "macro.fivetran_utils.snowflake__json_extract": {"unique_id": "macro.fivetran_utils.snowflake__json_extract", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/json_extract.sql", "original_file_path": "macros/json_extract.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.9704509, "supported_languages": null}, "macro.fivetran_utils.redshift__json_extract": {"unique_id": "macro.fivetran_utils.redshift__json_extract", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/json_extract.sql", "original_file_path": "macros/json_extract.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.970618, "supported_languages": null}, "macro.fivetran_utils.bigquery__json_extract": {"unique_id": "macro.fivetran_utils.bigquery__json_extract", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/json_extract.sql", "original_file_path": "macros/json_extract.sql", "name": "bigquery__json_extract", "macro_sql": "{% macro bigquery__json_extract(string, string_path) %}\n\n json_extract_scalar({{string}}, {{ \"'$.\" ~ string_path ~ \"'\" }} )\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.9707708, "supported_languages": null}, "macro.fivetran_utils.postgres__json_extract": {"unique_id": "macro.fivetran_utils.postgres__json_extract", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/json_extract.sql", "original_file_path": "macros/json_extract.sql", "name": "postgres__json_extract", "macro_sql": "{% macro postgres__json_extract(string, string_path) %}\n\n {{string}}::json->>{{\"'\" ~ string_path ~ \"'\" }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.970919, "supported_languages": null}, "macro.fivetran_utils.collect_freshness": {"unique_id": "macro.fivetran_utils.collect_freshness", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/collect_freshness.sql", "original_file_path": "macros/collect_freshness.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.fivetran_utils.default__collect_freshness"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.9716742, "supported_languages": null}, "macro.fivetran_utils.default__collect_freshness": {"unique_id": "macro.fivetran_utils.default__collect_freshness", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/collect_freshness.sql", "original_file_path": "macros/collect_freshness.sql", "name": "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 {{ return(load_result('collect_freshness').table) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement", "macro.dbt.current_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.972631, "supported_languages": null}, "macro.fivetran_utils.timestamp_add": {"unique_id": "macro.fivetran_utils.timestamp_add", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/timestamp_add.sql", "original_file_path": "macros/timestamp_add.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.fivetran_utils.postgres__timestamp_add"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.973388, "supported_languages": null}, "macro.fivetran_utils.default__timestamp_add": {"unique_id": "macro.fivetran_utils.default__timestamp_add", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/timestamp_add.sql", "original_file_path": "macros/timestamp_add.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.973553, "supported_languages": null}, "macro.fivetran_utils.bigquery__timestamp_add": {"unique_id": "macro.fivetran_utils.bigquery__timestamp_add", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/timestamp_add.sql", "original_file_path": "macros/timestamp_add.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.973711, "supported_languages": null}, "macro.fivetran_utils.redshift__timestamp_add": {"unique_id": "macro.fivetran_utils.redshift__timestamp_add", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/timestamp_add.sql", "original_file_path": "macros/timestamp_add.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.973867, "supported_languages": null}, "macro.fivetran_utils.postgres__timestamp_add": {"unique_id": "macro.fivetran_utils.postgres__timestamp_add", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/timestamp_add.sql", "original_file_path": "macros/timestamp_add.sql", "name": "postgres__timestamp_add", "macro_sql": "{% macro postgres__timestamp_add(datepart, interval, from_timestamp) %}\n\n {{ from_timestamp }} + ((interval '1 {{ datepart }}') * ({{ interval }}))\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.97403, "supported_languages": null}, "macro.fivetran_utils.spark__timestamp_add": {"unique_id": "macro.fivetran_utils.spark__timestamp_add", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/timestamp_add.sql", "original_file_path": "macros/timestamp_add.sql", "name": "spark__timestamp_add", "macro_sql": "{% macro spark__timestamp_add(datepart, interval, from_timestamp) %}\n\n {{ dbt.dateadd(datepart, interval, from_timestamp) }}\n \n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.dateadd"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.9742742, "supported_languages": null}, "macro.fivetran_utils.ceiling": {"unique_id": "macro.fivetran_utils.ceiling", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/ceiling.sql", "original_file_path": "macros/ceiling.sql", "name": "ceiling", "macro_sql": "{% macro ceiling(num) -%}\n\n{{ adapter.dispatch('ceiling', 'fivetran_utils') (num) }}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.fivetran_utils.default__ceiling"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.974606, "supported_languages": null}, "macro.fivetran_utils.default__ceiling": {"unique_id": "macro.fivetran_utils.default__ceiling", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/ceiling.sql", "original_file_path": "macros/ceiling.sql", "name": "default__ceiling", "macro_sql": "{% macro default__ceiling(num) %}\n ceiling({{ num }})\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.974706, "supported_languages": null}, "macro.fivetran_utils.snowflake__ceiling": {"unique_id": "macro.fivetran_utils.snowflake__ceiling", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/ceiling.sql", "original_file_path": "macros/ceiling.sql", "name": "snowflake__ceiling", "macro_sql": "{% macro snowflake__ceiling(num) %}\n ceil({{ num }})\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.974808, "supported_languages": null}, "macro.fivetran_utils.remove_prefix_from_columns": {"unique_id": "macro.fivetran_utils.remove_prefix_from_columns", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/remove_prefix_from_columns.sql", "original_file_path": "macros/remove_prefix_from_columns.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.9755101, "supported_languages": null}, "macro.fivetran_utils.union_data": {"unique_id": "macro.fivetran_utils.union_data", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/union_data.sql", "original_file_path": "macros/union_data.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.fivetran_utils.default__union_data"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.9769652, "supported_languages": null}, "macro.fivetran_utils.default__union_data": {"unique_id": "macro.fivetran_utils.default__union_data", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/union_data.sql", "original_file_path": "macros/union_data.sql", "name": "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\n {% do relations.append(relation) %}\n \n {% endif %}\n\n {% endfor %}\n\n {{ dbt_utils.union_relations(relations) }}\n\n{% elif var(union_database_variable, none) %}\n\n {% set relations = [] %}\n\n {% for database in var(union_database_variable) %}\n\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\n {% do relations.append(relation) %}\n \n {% endif %}\n\n {% endfor %}\n\n {{ dbt_utils.union_relations(relations) }}\n\n{% else %}\n\n select * \n from {{ var(default_variable) }}\n\n{% endif %}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_utils.union_relations"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.9793549, "supported_languages": null}, "macro.fivetran_utils.dummy_coalesce_value": {"unique_id": "macro.fivetran_utils.dummy_coalesce_value", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/dummy_coalesce_value.sql", "original_file_path": "macros/dummy_coalesce_value.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.9808729, "supported_languages": null}, "macro.fivetran_utils.array_agg": {"unique_id": "macro.fivetran_utils.array_agg", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/array_agg.sql", "original_file_path": "macros/array_agg.sql", "name": "array_agg", "macro_sql": "{% macro array_agg(field_to_agg) -%}\n\n{{ adapter.dispatch('array_agg', 'fivetran_utils') (field_to_agg) }}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.fivetran_utils.default__array_agg"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.9812312, "supported_languages": null}, "macro.fivetran_utils.default__array_agg": {"unique_id": "macro.fivetran_utils.default__array_agg", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/array_agg.sql", "original_file_path": "macros/array_agg.sql", "name": "default__array_agg", "macro_sql": "{% macro default__array_agg(field_to_agg) %}\n array_agg({{ field_to_agg }})\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.981336, "supported_languages": null}, "macro.fivetran_utils.redshift__array_agg": {"unique_id": "macro.fivetran_utils.redshift__array_agg", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/array_agg.sql", "original_file_path": "macros/array_agg.sql", "name": "redshift__array_agg", "macro_sql": "{% macro redshift__array_agg(field_to_agg) %}\n listagg({{ field_to_agg }}, ',')\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.981437, "supported_languages": null}, "macro.fivetran_utils.empty_variable_warning": {"unique_id": "macro.fivetran_utils.empty_variable_warning", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/empty_variable_warning.sql", "original_file_path": "macros/empty_variable_warning.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.9819021, "supported_languages": null}, "macro.fivetran_utils.enabled_vars_one_true": {"unique_id": "macro.fivetran_utils.enabled_vars_one_true", "package_name": "fivetran_utils", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/fivetran_utils", "path": "macros/enabled_vars_one_true.sql", "original_file_path": "macros/enabled_vars_one_true.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.982362, "supported_languages": null}, "macro.apple_search_ads_source.get_ad_group_history_columns": {"unique_id": "macro.apple_search_ads_source.get_ad_group_history_columns", "package_name": "apple_search_ads_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "macros/get_ad_group_history_columns.sql", "original_file_path": "macros/get_ad_group_history_columns.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.type_int", "macro.dbt.type_timestamp", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.983392, "supported_languages": null}, "macro.apple_search_ads_source.get_ad_level_report_columns": {"unique_id": "macro.apple_search_ads_source.get_ad_level_report_columns", "package_name": "apple_search_ads_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "macros/get_ad_level_report_columns.sql", "original_file_path": "macros/get_ad_level_report_columns.sql", "name": "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\": \"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] %}\n\n{{ fivetran_utils.add_pass_through_columns(columns, var('apple_search_ads__ad_passthrough_metrics')) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.type_int", "macro.dbt.type_numeric", "macro.dbt.type_string", "macro.fivetran_utils.add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.984689, "supported_languages": null}, "macro.apple_search_ads_source.get_search_term_report_columns": {"unique_id": "macro.apple_search_ads_source.get_search_term_report_columns", "package_name": "apple_search_ads_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "macros/get_search_term_report_columns.sql", "original_file_path": "macros/get_search_term_report_columns.sql", "name": "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\": \"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] %}\n\n{{ return(columns) }}\n\n{{ fivetran_utils.add_pass_through_columns(columns, var('apple_search_ads__search_term_passthrough_metrics')) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.type_string", "macro.dbt.type_int", "macro.dbt.type_numeric", "macro.fivetran_utils.add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.9870908, "supported_languages": null}, "macro.apple_search_ads_source.get_keyword_report_columns": {"unique_id": "macro.apple_search_ads_source.get_keyword_report_columns", "package_name": "apple_search_ads_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "macros/get_keyword_report_columns.sql", "original_file_path": "macros/get_keyword_report_columns.sql", "name": "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\": \"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] %}\n\n{{ fivetran_utils.add_pass_through_columns(columns, var('apple_search_ads__keyword_passthrough_metrics')) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.type_int", "macro.dbt.type_numeric", "macro.dbt.type_string", "macro.fivetran_utils.add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.988202, "supported_languages": null}, "macro.apple_search_ads_source.get_campaign_report_columns": {"unique_id": "macro.apple_search_ads_source.get_campaign_report_columns", "package_name": "apple_search_ads_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "macros/get_campaign_report_columns.sql", "original_file_path": "macros/get_campaign_report_columns.sql", "name": "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\": \"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] %}\n\n{{ fivetran_utils.add_pass_through_columns(columns, var('apple_search_ads__campaign_passthrough_metrics')) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.type_int", "macro.dbt.type_numeric", "macro.dbt.type_string", "macro.fivetran_utils.add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.989311, "supported_languages": null}, "macro.apple_search_ads_source.get_campaign_history_columns": {"unique_id": "macro.apple_search_ads_source.get_campaign_history_columns", "package_name": "apple_search_ads_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "macros/get_campaign_history_columns.sql", "original_file_path": "macros/get_campaign_history_columns.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_int", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.990219, "supported_languages": null}, "macro.apple_search_ads_source.get_ad_history_columns": {"unique_id": "macro.apple_search_ads_source.get_ad_history_columns", "package_name": "apple_search_ads_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "macros/get_ad_history_columns.sql", "original_file_path": "macros/get_ad_history_columns.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.type_int", "macro.dbt.type_timestamp", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.9912388, "supported_languages": null}, "macro.apple_search_ads_source.get_ad_group_report_columns": {"unique_id": "macro.apple_search_ads_source.get_ad_group_report_columns", "package_name": "apple_search_ads_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "macros/get_ad_group_report_columns.sql", "original_file_path": "macros/get_ad_group_report_columns.sql", "name": "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\": \"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] %}\n\n{{ fivetran_utils.add_pass_through_columns(columns, var('apple_search_ads__ad_group_passthrough_metrics')) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.type_int", "macro.dbt.type_numeric", "macro.dbt.type_string", "macro.fivetran_utils.add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.99233, "supported_languages": null}, "macro.apple_search_ads_source.get_organization_columns": {"unique_id": "macro.apple_search_ads_source.get_organization_columns", "package_name": "apple_search_ads_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "macros/get_organization_columns.sql", "original_file_path": "macros/get_organization_columns.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.type_string", "macro.dbt.type_int"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1671505472.9930592, "supported_languages": null}, "macro.apple_search_ads_source.get_keyword_history_columns": {"unique_id": "macro.apple_search_ads_source.get_keyword_history_columns", "package_name": "apple_search_ads_source", "root_path": "/Users/joseph.markiewicz/Documents/dbt_packages/apple_search_ads/dbt_apple_search_ads/integration_tests/dbt_packages/apple_search_ads_source", "path": "macros/get_keyword_history_columns.sql", "original_file_path": "macros/get_keyword_history_columns.sql", "name": "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 %}", "resource_type": "macro", "tags": [], "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}, "patch_path": null, "arguments": [], "created_at": 1671505472.994155, "supported_languages": null}}, "docs": {"dbt.__overview__": {"unique_id": "dbt.__overview__", "package_name": "dbt", "root_path": "/opt/homebrew/Cellar/dbt-postgres/1.3.0/libexec/lib/python3.9/site-packages/dbt/include/global_project", "path": "overview.md", "original_file_path": "docs/overview.md", "name": "__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"}}, "exposures": {}, "metrics": {}, "selectors": {}, "disabled": {}, "parent_map": {"seed.apple_search_ads_integration_tests.ad_group_report_data": [], "seed.apple_search_ads_integration_tests.ad_report_data": [], "seed.apple_search_ads_integration_tests.keyword_report_data": [], "seed.apple_search_ads_integration_tests.ad_history_data": [], "seed.apple_search_ads_integration_tests.ad_group_history_data": [], "seed.apple_search_ads_integration_tests.campaign_history_data": [], "seed.apple_search_ads_integration_tests.campaign_report_data": [], "seed.apple_search_ads_integration_tests.keyword_history_data": [], "seed.apple_search_ads_integration_tests.search_term_report_data": [], "seed.apple_search_ads_integration_tests.organization_data": [], "model.apple_search_ads.apple_search_ads__ad_report": ["model.apple_search_ads_source.stg_apple_search_ads__ad_group_history", "model.apple_search_ads_source.stg_apple_search_ads__ad_history", "model.apple_search_ads_source.stg_apple_search_ads__ad_report", "model.apple_search_ads_source.stg_apple_search_ads__campaign_history", "model.apple_search_ads_source.stg_apple_search_ads__organization"], "model.apple_search_ads.apple_search_ads__ad_group_report": ["model.apple_search_ads_source.stg_apple_search_ads__ad_group_history", "model.apple_search_ads_source.stg_apple_search_ads__ad_group_report", "model.apple_search_ads_source.stg_apple_search_ads__campaign_history", "model.apple_search_ads_source.stg_apple_search_ads__organization"], "model.apple_search_ads.apple_search_ads__keyword_report": ["model.apple_search_ads_source.stg_apple_search_ads__ad_group_history", "model.apple_search_ads_source.stg_apple_search_ads__campaign_history", "model.apple_search_ads_source.stg_apple_search_ads__keyword_history", "model.apple_search_ads_source.stg_apple_search_ads__keyword_report", "model.apple_search_ads_source.stg_apple_search_ads__organization"], "model.apple_search_ads.apple_search_ads__search_term_report": ["model.apple_search_ads_source.stg_apple_search_ads__campaign_history", "model.apple_search_ads_source.stg_apple_search_ads__organization", "model.apple_search_ads_source.stg_apple_search_ads__search_term_report"], "model.apple_search_ads.apple_search_ads__campaign_report": ["model.apple_search_ads_source.stg_apple_search_ads__campaign_history", "model.apple_search_ads_source.stg_apple_search_ads__campaign_report", "model.apple_search_ads_source.stg_apple_search_ads__organization"], "model.apple_search_ads.apple_search_ads__organization_report": ["model.apple_search_ads_source.stg_apple_search_ads__campaign_history", "model.apple_search_ads_source.stg_apple_search_ads__campaign_report", "model.apple_search_ads_source.stg_apple_search_ads__organization"], "model.apple_search_ads_source.stg_apple_search_ads__campaign_history": ["model.apple_search_ads_source.stg_apple_search_ads__campaign_history_tmp", "model.apple_search_ads_source.stg_apple_search_ads__campaign_history_tmp"], "model.apple_search_ads_source.stg_apple_search_ads__ad_report": ["model.apple_search_ads_source.stg_apple_search_ads__ad_report_tmp", "model.apple_search_ads_source.stg_apple_search_ads__ad_report_tmp"], "model.apple_search_ads_source.stg_apple_search_ads__campaign_report": ["model.apple_search_ads_source.stg_apple_search_ads__campaign_report_tmp", "model.apple_search_ads_source.stg_apple_search_ads__campaign_report_tmp"], "model.apple_search_ads_source.stg_apple_search_ads__organization": ["model.apple_search_ads_source.stg_apple_search_ads__organization_tmp", "model.apple_search_ads_source.stg_apple_search_ads__organization_tmp"], "model.apple_search_ads_source.stg_apple_search_ads__keyword_report": ["model.apple_search_ads_source.stg_apple_search_ads__keyword_report_tmp", "model.apple_search_ads_source.stg_apple_search_ads__keyword_report_tmp"], "model.apple_search_ads_source.stg_apple_search_ads__keyword_history": ["model.apple_search_ads_source.stg_apple_search_ads__keyword_history_tmp", "model.apple_search_ads_source.stg_apple_search_ads__keyword_history_tmp"], "model.apple_search_ads_source.stg_apple_search_ads__search_term_report": ["model.apple_search_ads_source.stg_apple_search_ads__search_term_report_tmp", "model.apple_search_ads_source.stg_apple_search_ads__search_term_report_tmp"], "model.apple_search_ads_source.stg_apple_search_ads__ad_group_history": ["model.apple_search_ads_source.stg_apple_search_ads__ad_group_history_tmp", "model.apple_search_ads_source.stg_apple_search_ads__ad_group_history_tmp"], "model.apple_search_ads_source.stg_apple_search_ads__ad_history": ["model.apple_search_ads_source.stg_apple_search_ads__ad_history_tmp", "model.apple_search_ads_source.stg_apple_search_ads__ad_history_tmp"], "model.apple_search_ads_source.stg_apple_search_ads__ad_group_report": ["model.apple_search_ads_source.stg_apple_search_ads__ad_group_report_tmp", "model.apple_search_ads_source.stg_apple_search_ads__ad_group_report_tmp"], "model.apple_search_ads_source.stg_apple_search_ads__search_term_report_tmp": ["source.apple_search_ads_source.apple_search_ads.search_term_report"], "model.apple_search_ads_source.stg_apple_search_ads__campaign_history_tmp": ["source.apple_search_ads_source.apple_search_ads.campaign_history"], "model.apple_search_ads_source.stg_apple_search_ads__keyword_history_tmp": ["source.apple_search_ads_source.apple_search_ads.keyword_history"], "model.apple_search_ads_source.stg_apple_search_ads__ad_group_history_tmp": ["source.apple_search_ads_source.apple_search_ads.ad_group_history"], "model.apple_search_ads_source.stg_apple_search_ads__ad_group_report_tmp": ["source.apple_search_ads_source.apple_search_ads.ad_group_report"], "model.apple_search_ads_source.stg_apple_search_ads__ad_history_tmp": ["source.apple_search_ads_source.apple_search_ads.ad_history"], "model.apple_search_ads_source.stg_apple_search_ads__campaign_report_tmp": ["source.apple_search_ads_source.apple_search_ads.campaign_report"], "model.apple_search_ads_source.stg_apple_search_ads__organization_tmp": ["source.apple_search_ads_source.apple_search_ads.organization"], "model.apple_search_ads_source.stg_apple_search_ads__keyword_report_tmp": ["source.apple_search_ads_source.apple_search_ads.keyword_report"], "model.apple_search_ads_source.stg_apple_search_ads__ad_report_tmp": ["source.apple_search_ads_source.apple_search_ads.ad_level_report"], "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.dbt_utils_unique_combination_of_columns_apple_search_ads__ad_group_report_organization_id__campaign_id__ad_group_id__date_day.19d180bab9": ["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.dbt_utils_unique_combination_of_columns_apple_search_ads__ad_report_organization_id__campaign_id__ad_group_id__ad_id__date_day.54e27817a1": ["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.dbt_utils_unique_combination_of_columns_apple_search_ads__campaign_report_organization_id__campaign_id__date_day.647e56213f": ["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.dbt_utils_unique_combination_of_columns_apple_search_ads__keyword_report_organization_id__campaign_id__ad_group_id__keyword_id__date_day.78fb033a13": ["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.dbt_utils_unique_combination_of_columns_apple_search_ads__organization_report_organization_id__date_day.8bc84fccc3": ["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.dbt_utils_unique_combination_of_columns_apple_search_ads__search_term_report_search_term_text__date_day.e60fe79ec4": ["model.apple_search_ads.apple_search_ads__search_term_report"], "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_group_history_modified_at.e5d65fa28f": ["model.apple_search_ads_source.stg_apple_search_ads__ad_group_history"], "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_group_history_ad_group_id.dc128eecb7": ["model.apple_search_ads_source.stg_apple_search_ads__ad_group_history"], "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__ad_group_history_ad_group_id__modified_at.84af14c83b": ["model.apple_search_ads_source.stg_apple_search_ads__ad_group_history"], "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_group_report_ad_group_id.a115f9cfc1": ["model.apple_search_ads_source.stg_apple_search_ads__ad_group_report"], "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_group_report_date_day.4dfd46a43b": ["model.apple_search_ads_source.stg_apple_search_ads__ad_group_report"], "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__ad_group_report_ad_group_id__date_day.a0fcc4e33c": ["model.apple_search_ads_source.stg_apple_search_ads__ad_group_report"], "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_history_modified_at.2eea7e006d": ["model.apple_search_ads_source.stg_apple_search_ads__ad_history"], "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_history_ad_id.4ad3bde32a": ["model.apple_search_ads_source.stg_apple_search_ads__ad_history"], "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__ad_history_ad_id__modified_at.38599b8cba": ["model.apple_search_ads_source.stg_apple_search_ads__ad_history"], "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_report_date_day.e6252346d8": ["model.apple_search_ads_source.stg_apple_search_ads__ad_report"], "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_report_ad_group_id.a397755e9f": ["model.apple_search_ads_source.stg_apple_search_ads__ad_report"], "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_report_ad_id.d08e760c58": ["model.apple_search_ads_source.stg_apple_search_ads__ad_report"], "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__ad_report_ad_id__date_day__ad_group_id.0d8d23c516": ["model.apple_search_ads_source.stg_apple_search_ads__ad_report"], "test.apple_search_ads_source.not_null_stg_apple_search_ads__campaign_history_modified_at.f34a7a97c9": ["model.apple_search_ads_source.stg_apple_search_ads__campaign_history"], "test.apple_search_ads_source.not_null_stg_apple_search_ads__campaign_history_campaign_id.3f0f7502b8": ["model.apple_search_ads_source.stg_apple_search_ads__campaign_history"], "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__campaign_history_campaign_id__modified_at.317f970af9": ["model.apple_search_ads_source.stg_apple_search_ads__campaign_history"], "test.apple_search_ads_source.not_null_stg_apple_search_ads__campaign_report_campaign_id.b83941e728": ["model.apple_search_ads_source.stg_apple_search_ads__campaign_report"], "test.apple_search_ads_source.not_null_stg_apple_search_ads__campaign_report_date_day.c8dc10a6f3": ["model.apple_search_ads_source.stg_apple_search_ads__campaign_report"], "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__campaign_report_campaign_id__date_day.bad41b0481": ["model.apple_search_ads_source.stg_apple_search_ads__campaign_report"], "test.apple_search_ads_source.not_null_stg_apple_search_ads__keyword_history_modified_at.42fde5a287": ["model.apple_search_ads_source.stg_apple_search_ads__keyword_history"], "test.apple_search_ads_source.not_null_stg_apple_search_ads__keyword_history_keyword_id.889f83cfd2": ["model.apple_search_ads_source.stg_apple_search_ads__keyword_history"], "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__keyword_history_keyword_id__modified_at.7b06162d24": ["model.apple_search_ads_source.stg_apple_search_ads__keyword_history"], "test.apple_search_ads_source.not_null_stg_apple_search_ads__keyword_report_keyword_id.501725b09e": ["model.apple_search_ads_source.stg_apple_search_ads__keyword_report"], "test.apple_search_ads_source.not_null_stg_apple_search_ads__keyword_report_date_day.16098db928": ["model.apple_search_ads_source.stg_apple_search_ads__keyword_report"], "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__keyword_report_keyword_id__date_day.9f0099cff8": ["model.apple_search_ads_source.stg_apple_search_ads__keyword_report"], "test.apple_search_ads_source.not_null_stg_apple_search_ads__organization_organization_id.b013ce33cb": ["model.apple_search_ads_source.stg_apple_search_ads__organization"], "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__organization_organization_id.8647048f7a": ["model.apple_search_ads_source.stg_apple_search_ads__organization"], "test.apple_search_ads_source.not_null_stg_apple_search_ads__search_term_report__fivetran_id.aa430d1dad": ["model.apple_search_ads_source.stg_apple_search_ads__search_term_report"], "test.apple_search_ads_source.not_null_stg_apple_search_ads__search_term_report_date_day.fd93df3302": ["model.apple_search_ads_source.stg_apple_search_ads__search_term_report"], "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__search_term_report__fivetran_id__date_day.aad2a48344": ["model.apple_search_ads_source.stg_apple_search_ads__search_term_report"], "source.apple_search_ads_source.apple_search_ads.ad_group_history": [], "source.apple_search_ads_source.apple_search_ads.ad_group_report": [], "source.apple_search_ads_source.apple_search_ads.ad_history": [], "source.apple_search_ads_source.apple_search_ads.ad_level_report": [], "source.apple_search_ads_source.apple_search_ads.campaign_history": [], "source.apple_search_ads_source.apple_search_ads.campaign_report": [], "source.apple_search_ads_source.apple_search_ads.keyword_history": [], "source.apple_search_ads_source.apple_search_ads.keyword_report": [], "source.apple_search_ads_source.apple_search_ads.organization": [], "source.apple_search_ads_source.apple_search_ads.search_term_report": []}, "child_map": {"seed.apple_search_ads_integration_tests.ad_group_report_data": [], "seed.apple_search_ads_integration_tests.ad_report_data": [], "seed.apple_search_ads_integration_tests.keyword_report_data": [], "seed.apple_search_ads_integration_tests.ad_history_data": [], "seed.apple_search_ads_integration_tests.ad_group_history_data": [], "seed.apple_search_ads_integration_tests.campaign_history_data": [], "seed.apple_search_ads_integration_tests.campaign_report_data": [], "seed.apple_search_ads_integration_tests.keyword_history_data": [], "seed.apple_search_ads_integration_tests.search_term_report_data": [], "seed.apple_search_ads_integration_tests.organization_data": [], "model.apple_search_ads.apple_search_ads__ad_report": ["test.apple_search_ads.dbt_utils_unique_combination_of_columns_apple_search_ads__ad_report_organization_id__campaign_id__ad_group_id__ad_id__date_day.54e27817a1", "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__ad_group_report": ["test.apple_search_ads.dbt_utils_unique_combination_of_columns_apple_search_ads__ad_group_report_organization_id__campaign_id__ad_group_id__date_day.19d180bab9", "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.apple_search_ads__keyword_report": ["test.apple_search_ads.dbt_utils_unique_combination_of_columns_apple_search_ads__keyword_report_organization_id__campaign_id__ad_group_id__keyword_id__date_day.78fb033a13", "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__search_term_report": ["test.apple_search_ads.dbt_utils_unique_combination_of_columns_apple_search_ads__search_term_report_search_term_text__date_day.e60fe79ec4", "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__campaign_report": ["test.apple_search_ads.dbt_utils_unique_combination_of_columns_apple_search_ads__campaign_report_organization_id__campaign_id__date_day.647e56213f", "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": ["test.apple_search_ads.dbt_utils_unique_combination_of_columns_apple_search_ads__organization_report_organization_id__date_day.8bc84fccc3", "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_source.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_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__campaign_history_campaign_id__modified_at.317f970af9", "test.apple_search_ads_source.not_null_stg_apple_search_ads__campaign_history_campaign_id.3f0f7502b8", "test.apple_search_ads_source.not_null_stg_apple_search_ads__campaign_history_modified_at.f34a7a97c9"], "model.apple_search_ads_source.stg_apple_search_ads__ad_report": ["model.apple_search_ads.apple_search_ads__ad_report", "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__ad_report_ad_id__date_day__ad_group_id.0d8d23c516", "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_report_ad_group_id.a397755e9f", "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_report_ad_id.d08e760c58", "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_report_date_day.e6252346d8"], "model.apple_search_ads_source.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_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__campaign_report_campaign_id__date_day.bad41b0481", "test.apple_search_ads_source.not_null_stg_apple_search_ads__campaign_report_campaign_id.b83941e728", "test.apple_search_ads_source.not_null_stg_apple_search_ads__campaign_report_date_day.c8dc10a6f3"], "model.apple_search_ads_source.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_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__organization_organization_id.8647048f7a", "test.apple_search_ads_source.not_null_stg_apple_search_ads__organization_organization_id.b013ce33cb"], "model.apple_search_ads_source.stg_apple_search_ads__keyword_report": ["model.apple_search_ads.apple_search_ads__keyword_report", "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__keyword_report_keyword_id__date_day.9f0099cff8", "test.apple_search_ads_source.not_null_stg_apple_search_ads__keyword_report_date_day.16098db928", "test.apple_search_ads_source.not_null_stg_apple_search_ads__keyword_report_keyword_id.501725b09e"], "model.apple_search_ads_source.stg_apple_search_ads__keyword_history": ["model.apple_search_ads.apple_search_ads__keyword_report", "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__keyword_history_keyword_id__modified_at.7b06162d24", "test.apple_search_ads_source.not_null_stg_apple_search_ads__keyword_history_keyword_id.889f83cfd2", "test.apple_search_ads_source.not_null_stg_apple_search_ads__keyword_history_modified_at.42fde5a287"], "model.apple_search_ads_source.stg_apple_search_ads__search_term_report": ["model.apple_search_ads.apple_search_ads__search_term_report", "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__search_term_report__fivetran_id__date_day.aad2a48344", "test.apple_search_ads_source.not_null_stg_apple_search_ads__search_term_report__fivetran_id.aa430d1dad", "test.apple_search_ads_source.not_null_stg_apple_search_ads__search_term_report_date_day.fd93df3302"], "model.apple_search_ads_source.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_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__ad_group_history_ad_group_id__modified_at.84af14c83b", "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_group_history_ad_group_id.dc128eecb7", "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_group_history_modified_at.e5d65fa28f"], "model.apple_search_ads_source.stg_apple_search_ads__ad_history": ["model.apple_search_ads.apple_search_ads__ad_report", "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__ad_history_ad_id__modified_at.38599b8cba", "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_history_ad_id.4ad3bde32a", "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_history_modified_at.2eea7e006d"], "model.apple_search_ads_source.stg_apple_search_ads__ad_group_report": ["model.apple_search_ads.apple_search_ads__ad_group_report", "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__ad_group_report_ad_group_id__date_day.a0fcc4e33c", "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_group_report_ad_group_id.a115f9cfc1", "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_group_report_date_day.4dfd46a43b"], "model.apple_search_ads_source.stg_apple_search_ads__search_term_report_tmp": ["model.apple_search_ads_source.stg_apple_search_ads__search_term_report", "model.apple_search_ads_source.stg_apple_search_ads__search_term_report"], "model.apple_search_ads_source.stg_apple_search_ads__campaign_history_tmp": ["model.apple_search_ads_source.stg_apple_search_ads__campaign_history", "model.apple_search_ads_source.stg_apple_search_ads__campaign_history"], "model.apple_search_ads_source.stg_apple_search_ads__keyword_history_tmp": ["model.apple_search_ads_source.stg_apple_search_ads__keyword_history", "model.apple_search_ads_source.stg_apple_search_ads__keyword_history"], "model.apple_search_ads_source.stg_apple_search_ads__ad_group_history_tmp": ["model.apple_search_ads_source.stg_apple_search_ads__ad_group_history", "model.apple_search_ads_source.stg_apple_search_ads__ad_group_history"], "model.apple_search_ads_source.stg_apple_search_ads__ad_group_report_tmp": ["model.apple_search_ads_source.stg_apple_search_ads__ad_group_report", "model.apple_search_ads_source.stg_apple_search_ads__ad_group_report"], "model.apple_search_ads_source.stg_apple_search_ads__ad_history_tmp": ["model.apple_search_ads_source.stg_apple_search_ads__ad_history", "model.apple_search_ads_source.stg_apple_search_ads__ad_history"], "model.apple_search_ads_source.stg_apple_search_ads__campaign_report_tmp": ["model.apple_search_ads_source.stg_apple_search_ads__campaign_report", "model.apple_search_ads_source.stg_apple_search_ads__campaign_report"], "model.apple_search_ads_source.stg_apple_search_ads__organization_tmp": ["model.apple_search_ads_source.stg_apple_search_ads__organization", "model.apple_search_ads_source.stg_apple_search_ads__organization"], "model.apple_search_ads_source.stg_apple_search_ads__keyword_report_tmp": ["model.apple_search_ads_source.stg_apple_search_ads__keyword_report", "model.apple_search_ads_source.stg_apple_search_ads__keyword_report"], "model.apple_search_ads_source.stg_apple_search_ads__ad_report_tmp": ["model.apple_search_ads_source.stg_apple_search_ads__ad_report", "model.apple_search_ads_source.stg_apple_search_ads__ad_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": [], "test.apple_search_ads.dbt_utils_unique_combination_of_columns_apple_search_ads__ad_group_report_organization_id__campaign_id__ad_group_id__date_day.19d180bab9": [], "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.dbt_utils_unique_combination_of_columns_apple_search_ads__ad_report_organization_id__campaign_id__ad_group_id__ad_id__date_day.54e27817a1": [], "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.dbt_utils_unique_combination_of_columns_apple_search_ads__campaign_report_organization_id__campaign_id__date_day.647e56213f": [], "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.dbt_utils_unique_combination_of_columns_apple_search_ads__keyword_report_organization_id__campaign_id__ad_group_id__keyword_id__date_day.78fb033a13": [], "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.dbt_utils_unique_combination_of_columns_apple_search_ads__organization_report_organization_id__date_day.8bc84fccc3": [], "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.dbt_utils_unique_combination_of_columns_apple_search_ads__search_term_report_search_term_text__date_day.e60fe79ec4": [], "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_group_history_modified_at.e5d65fa28f": [], "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_group_history_ad_group_id.dc128eecb7": [], "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__ad_group_history_ad_group_id__modified_at.84af14c83b": [], "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_group_report_ad_group_id.a115f9cfc1": [], "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_group_report_date_day.4dfd46a43b": [], "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__ad_group_report_ad_group_id__date_day.a0fcc4e33c": [], "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_history_modified_at.2eea7e006d": [], "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_history_ad_id.4ad3bde32a": [], "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__ad_history_ad_id__modified_at.38599b8cba": [], "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_report_date_day.e6252346d8": [], "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_report_ad_group_id.a397755e9f": [], "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_report_ad_id.d08e760c58": [], "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__ad_report_ad_id__date_day__ad_group_id.0d8d23c516": [], "test.apple_search_ads_source.not_null_stg_apple_search_ads__campaign_history_modified_at.f34a7a97c9": [], "test.apple_search_ads_source.not_null_stg_apple_search_ads__campaign_history_campaign_id.3f0f7502b8": [], "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__campaign_history_campaign_id__modified_at.317f970af9": [], "test.apple_search_ads_source.not_null_stg_apple_search_ads__campaign_report_campaign_id.b83941e728": [], "test.apple_search_ads_source.not_null_stg_apple_search_ads__campaign_report_date_day.c8dc10a6f3": [], "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__campaign_report_campaign_id__date_day.bad41b0481": [], "test.apple_search_ads_source.not_null_stg_apple_search_ads__keyword_history_modified_at.42fde5a287": [], "test.apple_search_ads_source.not_null_stg_apple_search_ads__keyword_history_keyword_id.889f83cfd2": [], "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__keyword_history_keyword_id__modified_at.7b06162d24": [], "test.apple_search_ads_source.not_null_stg_apple_search_ads__keyword_report_keyword_id.501725b09e": [], "test.apple_search_ads_source.not_null_stg_apple_search_ads__keyword_report_date_day.16098db928": [], "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__keyword_report_keyword_id__date_day.9f0099cff8": [], "test.apple_search_ads_source.not_null_stg_apple_search_ads__organization_organization_id.b013ce33cb": [], "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__organization_organization_id.8647048f7a": [], "test.apple_search_ads_source.not_null_stg_apple_search_ads__search_term_report__fivetran_id.aa430d1dad": [], "test.apple_search_ads_source.not_null_stg_apple_search_ads__search_term_report_date_day.fd93df3302": [], "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__search_term_report__fivetran_id__date_day.aad2a48344": [], "source.apple_search_ads_source.apple_search_ads.ad_group_history": ["model.apple_search_ads_source.stg_apple_search_ads__ad_group_history_tmp"], "source.apple_search_ads_source.apple_search_ads.ad_group_report": ["model.apple_search_ads_source.stg_apple_search_ads__ad_group_report_tmp"], "source.apple_search_ads_source.apple_search_ads.ad_history": ["model.apple_search_ads_source.stg_apple_search_ads__ad_history_tmp"], "source.apple_search_ads_source.apple_search_ads.ad_level_report": ["model.apple_search_ads_source.stg_apple_search_ads__ad_report_tmp"], "source.apple_search_ads_source.apple_search_ads.campaign_history": ["model.apple_search_ads_source.stg_apple_search_ads__campaign_history_tmp"], "source.apple_search_ads_source.apple_search_ads.campaign_report": ["model.apple_search_ads_source.stg_apple_search_ads__campaign_report_tmp"], "source.apple_search_ads_source.apple_search_ads.keyword_history": ["model.apple_search_ads_source.stg_apple_search_ads__keyword_history_tmp"], "source.apple_search_ads_source.apple_search_ads.keyword_report": ["model.apple_search_ads_source.stg_apple_search_ads__keyword_report_tmp"], "source.apple_search_ads_source.apple_search_ads.organization": ["model.apple_search_ads_source.stg_apple_search_ads__organization_tmp"], "source.apple_search_ads_source.apple_search_ads.search_term_report": ["model.apple_search_ads_source.stg_apple_search_ads__search_term_report_tmp"]}} \ No newline at end of file diff --git a/docs/run_results.json b/docs/run_results.json index 0ce3b0e..2f31108 100644 --- a/docs/run_results.json +++ b/docs/run_results.json @@ -1 +1 @@ -{"metadata": {"dbt_schema_version": "https://schemas.getdbt.com/dbt/run-results/v4.json", "dbt_version": "1.3.0", "generated_at": "2022-10-25T20:13:54.693257Z", "invocation_id": "2191920f-7f18-410e-bf49-1ac3da176caa", "env": {}}, "results": [{"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:53.395232Z", "completed_at": "2022-10-25T20:13:53.415689Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:53.416057Z", "completed_at": "2022-10-25T20:13:53.416079Z"}], "thread_id": "Thread-2 (worker)", "execution_time": 0.02472710609436035, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.apple_search_ads_source.stg_apple_search_ads__ad_group_report_tmp"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:53.395369Z", "completed_at": "2022-10-25T20:13:53.416165Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:53.417241Z", "completed_at": "2022-10-25T20:13:53.417247Z"}], "thread_id": "Thread-3 (worker)", "execution_time": 0.025351762771606445, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.apple_search_ads_source.stg_apple_search_ads__ad_history_tmp"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:53.395014Z", "completed_at": "2022-10-25T20:13:53.416230Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:53.417397Z", "completed_at": "2022-10-25T20:13:53.417402Z"}], "thread_id": "Thread-1 (worker)", "execution_time": 0.02710890769958496, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.apple_search_ads_source.stg_apple_search_ads__ad_group_history_tmp"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:53.395496Z", "completed_at": "2022-10-25T20:13:53.416298Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:53.417482Z", "completed_at": "2022-10-25T20:13:53.417485Z"}], "thread_id": "Thread-4 (worker)", "execution_time": 0.02524089813232422, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.apple_search_ads_source.stg_apple_search_ads__ad_report_tmp"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:53.419342Z", "completed_at": "2022-10-25T20:13:53.423944Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:53.431735Z", "completed_at": "2022-10-25T20:13:53.431742Z"}], "thread_id": "Thread-2 (worker)", "execution_time": 0.01450490951538086, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.apple_search_ads_source.stg_apple_search_ads__campaign_history_tmp"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:53.423660Z", "completed_at": "2022-10-25T20:13:53.432202Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:53.433081Z", "completed_at": "2022-10-25T20:13:53.433085Z"}], "thread_id": "Thread-3 (worker)", "execution_time": 0.014067888259887695, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.apple_search_ads_source.stg_apple_search_ads__campaign_report_tmp"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:53.423780Z", "completed_at": "2022-10-25T20:13:53.432310Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:53.433154Z", "completed_at": "2022-10-25T20:13:53.433158Z"}], "thread_id": "Thread-1 (worker)", "execution_time": 0.014059066772460938, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.apple_search_ads_source.stg_apple_search_ads__keyword_history_tmp"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:53.423858Z", "completed_at": "2022-10-25T20:13:53.432444Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:53.433293Z", "completed_at": "2022-10-25T20:13:53.433296Z"}], "thread_id": "Thread-4 (worker)", "execution_time": 0.014140844345092773, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.apple_search_ads_source.stg_apple_search_ads__keyword_report_tmp"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:53.433900Z", "completed_at": "2022-10-25T20:13:53.437844Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:53.443358Z", "completed_at": "2022-10-25T20:13:53.443363Z"}], "thread_id": "Thread-2 (worker)", "execution_time": 0.011815786361694336, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.apple_search_ads_source.stg_apple_search_ads__organization_tmp"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:53.438038Z", "completed_at": "2022-10-25T20:13:53.444356Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:53.445111Z", "completed_at": "2022-10-25T20:13:53.445114Z"}], "thread_id": "Thread-1 (worker)", "execution_time": 0.008497953414916992, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.apple_search_ads_integration_tests.ad_group_history_data"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:53.438163Z", "completed_at": "2022-10-25T20:13:53.444722Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:53.445520Z", "completed_at": "2022-10-25T20:13:53.445523Z"}], "thread_id": "Thread-4 (worker)", "execution_time": 0.008589029312133789, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.apple_search_ads_integration_tests.ad_group_report_data"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:53.437976Z", "completed_at": "2022-10-25T20:13:53.444840Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:53.445811Z", "completed_at": "2022-10-25T20:13:53.445814Z"}], "thread_id": "Thread-3 (worker)", "execution_time": 0.009418964385986328, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.apple_search_ads_source.stg_apple_search_ads__search_term_report_tmp"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:53.446503Z", "completed_at": "2022-10-25T20:13:53.448427Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:53.449723Z", "completed_at": "2022-10-25T20:13:53.449727Z"}], "thread_id": "Thread-2 (worker)", "execution_time": 0.007122993469238281, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.apple_search_ads_integration_tests.ad_history_data"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:53.448541Z", "completed_at": "2022-10-25T20:13:53.450659Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:53.452811Z", "completed_at": "2022-10-25T20:13:53.452813Z"}], "thread_id": "Thread-1 (worker)", "execution_time": 0.006646871566772461, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.apple_search_ads_integration_tests.ad_report_data"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:53.448714Z", "completed_at": "2022-10-25T20:13:53.452460Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:53.453125Z", "completed_at": "2022-10-25T20:13:53.453128Z"}], "thread_id": "Thread-4 (worker)", "execution_time": 0.005719900131225586, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.apple_search_ads_integration_tests.campaign_history_data"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:53.449657Z", "completed_at": "2022-10-25T20:13:53.452579Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:53.453404Z", "completed_at": "2022-10-25T20:13:53.453407Z"}], "thread_id": "Thread-3 (worker)", "execution_time": 0.005730152130126953, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.apple_search_ads_integration_tests.campaign_report_data"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:53.454053Z", "completed_at": "2022-10-25T20:13:53.455838Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:53.457064Z", "completed_at": "2022-10-25T20:13:53.457068Z"}], "thread_id": "Thread-2 (worker)", "execution_time": 0.006033897399902344, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.apple_search_ads_integration_tests.keyword_history_data"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:53.455951Z", "completed_at": "2022-10-25T20:13:53.457979Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:53.459380Z", "completed_at": "2022-10-25T20:13:53.459383Z"}], "thread_id": "Thread-1 (worker)", "execution_time": 0.005639076232910156, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.apple_search_ads_integration_tests.keyword_report_data"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:53.456110Z", "completed_at": "2022-10-25T20:13:53.459064Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:53.459663Z", "completed_at": "2022-10-25T20:13:53.459665Z"}], "thread_id": "Thread-4 (worker)", "execution_time": 0.004783153533935547, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.apple_search_ads_integration_tests.organization_data"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:53.457007Z", "completed_at": "2022-10-25T20:13:53.459173Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:53.459925Z", "completed_at": "2022-10-25T20:13:53.459927Z"}], "thread_id": "Thread-3 (worker)", "execution_time": 0.004794120788574219, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.apple_search_ads_integration_tests.search_term_report_data"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:53.467407Z", "completed_at": "2022-10-25T20:13:53.817430Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:53.817901Z", "completed_at": "2022-10-25T20:13:53.817909Z"}], "thread_id": "Thread-3 (worker)", "execution_time": 0.35483694076538086, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.apple_search_ads_source.stg_apple_search_ads__ad_report"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:53.464213Z", "completed_at": "2022-10-25T20:13:53.817521Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:53.818117Z", "completed_at": "2022-10-25T20:13:53.818120Z"}], "thread_id": "Thread-1 (worker)", "execution_time": 0.358126163482666, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.apple_search_ads_source.stg_apple_search_ads__ad_history"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:53.464406Z", "completed_at": "2022-10-25T20:13:53.817675Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:53.818524Z", "completed_at": "2022-10-25T20:13:53.818527Z"}], "thread_id": "Thread-4 (worker)", "execution_time": 0.3560168743133545, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.apple_search_ads_source.stg_apple_search_ads__ad_group_history"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:53.460554Z", "completed_at": "2022-10-25T20:13:53.817745Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:53.818593Z", "completed_at": "2022-10-25T20:13:53.818596Z"}], "thread_id": "Thread-2 (worker)", "execution_time": 0.36006617546081543, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.apple_search_ads_source.stg_apple_search_ads__ad_group_report"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:53.823903Z", "completed_at": "2022-10-25T20:13:54.190527Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:54.191233Z", "completed_at": "2022-10-25T20:13:54.191242Z"}], "thread_id": "Thread-4 (worker)", "execution_time": 0.37120890617370605, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.apple_search_ads_source.stg_apple_search_ads__keyword_history"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:53.823986Z", "completed_at": "2022-10-25T20:13:54.190643Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:54.191327Z", "completed_at": "2022-10-25T20:13:54.191331Z"}], "thread_id": "Thread-2 (worker)", "execution_time": 0.37140893936157227, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.apple_search_ads_source.stg_apple_search_ads__keyword_report"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:53.821288Z", "completed_at": "2022-10-25T20:13:54.190729Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:54.191497Z", "completed_at": "2022-10-25T20:13:54.191500Z"}], "thread_id": "Thread-1 (worker)", "execution_time": 0.3723618984222412, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.apple_search_ads_source.stg_apple_search_ads__campaign_report"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:53.821095Z", "completed_at": "2022-10-25T20:13:54.191028Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:54.192392Z", "completed_at": "2022-10-25T20:13:54.192396Z"}], "thread_id": "Thread-3 (worker)", "execution_time": 0.3739299774169922, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.apple_search_ads_source.stg_apple_search_ads__campaign_history"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:54.195875Z", "completed_at": "2022-10-25T20:13:54.218506Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:54.218941Z", "completed_at": "2022-10-25T20:13:54.218948Z"}], "thread_id": "Thread-1 (worker)", "execution_time": 0.0245361328125, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__ad_report_ad_id__date_day__ad_group_id.0d8d23c516"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:54.201941Z", "completed_at": "2022-10-25T20:13:54.218686Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:54.219013Z", "completed_at": "2022-10-25T20:13:54.219015Z"}], "thread_id": "Thread-3 (worker)", "execution_time": 0.024479150772094727, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_report_ad_group_id.a397755e9f"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:54.221124Z", "completed_at": "2022-10-25T20:13:54.267637Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:54.267889Z", "completed_at": "2022-10-25T20:13:54.267896Z"}], "thread_id": "Thread-3 (worker)", "execution_time": 0.04759407043457031, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_report_date_day.e6252346d8"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:54.221053Z", "completed_at": "2022-10-25T20:13:54.282205Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:54.282338Z", "completed_at": "2022-10-25T20:13:54.282343Z"}], "thread_id": "Thread-1 (worker)", "execution_time": 0.062155961990356445, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_report_ad_id.d08e760c58"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:54.279287Z", "completed_at": "2022-10-25T20:13:54.284978Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:54.285166Z", "completed_at": "2022-10-25T20:13:54.285170Z"}], "thread_id": "Thread-3 (worker)", "execution_time": 0.008213996887207031, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__ad_history_ad_id__modified_at.38599b8cba"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:54.282923Z", "completed_at": "2022-10-25T20:13:54.285454Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:54.285951Z", "completed_at": "2022-10-25T20:13:54.285954Z"}], "thread_id": "Thread-1 (worker)", "execution_time": 0.003535032272338867, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_history_ad_id.4ad3bde32a"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:54.286330Z", "completed_at": "2022-10-25T20:13:54.291713Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:54.291857Z", "completed_at": "2022-10-25T20:13:54.291862Z"}], "thread_id": "Thread-3 (worker)", "execution_time": 0.006358146667480469, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_history_modified_at.2eea7e006d"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:54.288944Z", "completed_at": "2022-10-25T20:13:54.292235Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:54.292642Z", "completed_at": "2022-10-25T20:13:54.292645Z"}], "thread_id": "Thread-1 (worker)", "execution_time": 0.0042612552642822266, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__ad_group_history_ad_group_id__modified_at.84af14c83b"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:54.292700Z", "completed_at": "2022-10-25T20:13:54.295497Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:54.298386Z", "completed_at": "2022-10-25T20:13:54.298391Z"}], "thread_id": "Thread-3 (worker)", "execution_time": 0.006254911422729492, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_group_history_ad_group_id.dc128eecb7"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:54.295447Z", "completed_at": "2022-10-25T20:13:54.298772Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:54.299135Z", "completed_at": "2022-10-25T20:13:54.299138Z"}], "thread_id": "Thread-1 (worker)", "execution_time": 0.004312753677368164, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_group_history_modified_at.e5d65fa28f"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:54.299189Z", "completed_at": "2022-10-25T20:13:54.302545Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:54.304689Z", "completed_at": "2022-10-25T20:13:54.304693Z"}], "thread_id": "Thread-3 (worker)", "execution_time": 0.006070137023925781, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__ad_group_report_ad_group_id__date_day.a0fcc4e33c"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:54.302488Z", "completed_at": "2022-10-25T20:13:54.305053Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:54.305464Z", "completed_at": "2022-10-25T20:13:54.305467Z"}], "thread_id": "Thread-1 (worker)", "execution_time": 0.0034742355346679688, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_group_report_ad_group_id.a115f9cfc1"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:54.305519Z", "completed_at": "2022-10-25T20:13:54.308184Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:54.310777Z", "completed_at": "2022-10-25T20:13:54.310782Z"}], "thread_id": "Thread-3 (worker)", "execution_time": 0.005835056304931641, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_group_report_date_day.4dfd46a43b"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:54.308145Z", "completed_at": "2022-10-25T20:13:54.311140Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:54.311531Z", "completed_at": "2022-10-25T20:13:54.311534Z"}], "thread_id": "Thread-1 (worker)", "execution_time": 0.0038728713989257812, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__keyword_history_keyword_id__modified_at.7b06162d24"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:54.311584Z", "completed_at": "2022-10-25T20:13:54.314927Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:54.317101Z", "completed_at": "2022-10-25T20:13:54.317106Z"}], "thread_id": "Thread-3 (worker)", "execution_time": 0.006079912185668945, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__keyword_history_keyword_id.889f83cfd2"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:54.314888Z", "completed_at": "2022-10-25T20:13:54.317464Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:54.317847Z", "completed_at": "2022-10-25T20:13:54.317850Z"}], "thread_id": "Thread-1 (worker)", "execution_time": 0.0034399032592773438, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__keyword_history_modified_at.42fde5a287"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:54.317902Z", "completed_at": "2022-10-25T20:13:54.321221Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:54.323485Z", "completed_at": "2022-10-25T20:13:54.323490Z"}], "thread_id": "Thread-3 (worker)", "execution_time": 0.006137847900390625, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__keyword_report_keyword_id__date_day.9f0099cff8"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:54.321175Z", "completed_at": "2022-10-25T20:13:54.323927Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:54.324290Z", "completed_at": "2022-10-25T20:13:54.324293Z"}], "thread_id": "Thread-1 (worker)", "execution_time": 0.003659963607788086, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__keyword_report_date_day.16098db928"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:54.324348Z", "completed_at": "2022-10-25T20:13:54.327160Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:54.329875Z", "completed_at": "2022-10-25T20:13:54.329881Z"}], "thread_id": "Thread-3 (worker)", "execution_time": 0.00633692741394043, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__keyword_report_keyword_id.501725b09e"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:54.327211Z", "completed_at": "2022-10-25T20:13:54.330541Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:54.330918Z", "completed_at": "2022-10-25T20:13:54.330921Z"}], "thread_id": "Thread-1 (worker)", "execution_time": 0.004281759262084961, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__campaign_report_campaign_id__date_day.bad41b0481"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:54.330978Z", "completed_at": "2022-10-25T20:13:54.335210Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:54.337523Z", "completed_at": "2022-10-25T20:13:54.337529Z"}], "thread_id": "Thread-3 (worker)", "execution_time": 0.007122993469238281, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__campaign_report_campaign_id.b83941e728"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:54.335166Z", "completed_at": "2022-10-25T20:13:54.338137Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:54.338372Z", "completed_at": "2022-10-25T20:13:54.338376Z"}], "thread_id": "Thread-1 (worker)", "execution_time": 0.00634002685546875, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__campaign_report_date_day.c8dc10a6f3"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:54.338316Z", "completed_at": "2022-10-25T20:13:54.344697Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:54.344880Z", "completed_at": "2022-10-25T20:13:54.344885Z"}], "thread_id": "Thread-3 (worker)", "execution_time": 0.007169961929321289, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__campaign_history_campaign_id__modified_at.317f970af9"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:54.342251Z", "completed_at": "2022-10-25T20:13:54.345320Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:54.345720Z", "completed_at": "2022-10-25T20:13:54.345723Z"}], "thread_id": "Thread-1 (worker)", "execution_time": 0.00419306755065918, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__campaign_history_campaign_id.3f0f7502b8"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:54.345779Z", "completed_at": "2022-10-25T20:13:54.348329Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:54.348450Z", "completed_at": "2022-10-25T20:13:54.348454Z"}], "thread_id": "Thread-3 (worker)", "execution_time": 0.0032639503479003906, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__campaign_history_modified_at.f34a7a97c9"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:54.195656Z", "completed_at": "2022-10-25T20:13:54.556399Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:54.556767Z", "completed_at": "2022-10-25T20:13:54.556780Z"}], "thread_id": "Thread-4 (worker)", "execution_time": 0.36316418647766113, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.apple_search_ads_source.stg_apple_search_ads__organization"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:54.195734Z", "completed_at": "2022-10-25T20:13:54.576180Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:54.595237Z", "completed_at": "2022-10-25T20:13:54.595247Z"}], "thread_id": "Thread-2 (worker)", "execution_time": 0.40123510360717773, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.apple_search_ads_source.stg_apple_search_ads__search_term_report"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:54.576074Z", "completed_at": "2022-10-25T20:13:54.595877Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:54.596658Z", "completed_at": "2022-10-25T20:13:54.596663Z"}], "thread_id": "Thread-1 (worker)", "execution_time": 0.032414913177490234, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.apple_search_ads.apple_search_ads__ad_group_report"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:54.576270Z", "completed_at": "2022-10-25T20:13:54.596284Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:54.597211Z", "completed_at": "2022-10-25T20:13:54.597214Z"}], "thread_id": "Thread-3 (worker)", "execution_time": 0.022749900817871094, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.apple_search_ads.apple_search_ads__ad_report"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:54.576350Z", "completed_at": "2022-10-25T20:13:54.596588Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:54.597344Z", "completed_at": "2022-10-25T20:13:54.597346Z"}], "thread_id": "Thread-4 (worker)", "execution_time": 0.028183937072753906, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.apple_search_ads.apple_search_ads__campaign_report"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:54.597280Z", "completed_at": "2022-10-25T20:13:54.604547Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:54.609575Z", "completed_at": "2022-10-25T20:13:54.609581Z"}], "thread_id": "Thread-2 (worker)", "execution_time": 0.016181230545043945, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.apple_search_ads.apple_search_ads__keyword_report"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:54.604820Z", "completed_at": "2022-10-25T20:13:54.615022Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:54.615744Z", "completed_at": "2022-10-25T20:13:54.615749Z"}], "thread_id": "Thread-1 (worker)", "execution_time": 0.01244807243347168, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.apple_search_ads.apple_search_ads__organization_report"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:54.609506Z", "completed_at": "2022-10-25T20:13:54.615439Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:54.616324Z", "completed_at": "2022-10-25T20:13:54.616328Z"}], "thread_id": "Thread-3 (worker)", "execution_time": 0.012422800064086914, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__organization_organization_id.8647048f7a"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:54.609647Z", "completed_at": "2022-10-25T20:13:54.615800Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:54.616573Z", "completed_at": "2022-10-25T20:13:54.616576Z"}], "thread_id": "Thread-4 (worker)", "execution_time": 0.016308069229125977, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__organization_organization_id.b013ce33cb"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:54.616381Z", "completed_at": "2022-10-25T20:13:54.621365Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:54.624684Z", "completed_at": "2022-10-25T20:13:54.624689Z"}], "thread_id": "Thread-2 (worker)", "execution_time": 0.009513139724731445, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.apple_search_ads.apple_search_ads__search_term_report"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:54.621644Z", "completed_at": "2022-10-25T20:13:54.630225Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:54.630874Z", "completed_at": "2022-10-25T20:13:54.630881Z"}], "thread_id": "Thread-1 (worker)", "execution_time": 0.010662078857421875, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__search_term_report__fivetran_id__date_day.aad2a48344"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:54.624834Z", "completed_at": "2022-10-25T20:13:54.630929Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:54.631606Z", "completed_at": "2022-10-25T20:13:54.631609Z"}], "thread_id": "Thread-4 (worker)", "execution_time": 0.013434171676635742, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__search_term_report_date_day.fd93df3302"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:54.624746Z", "completed_at": "2022-10-25T20:13:54.630975Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:54.631663Z", "completed_at": "2022-10-25T20:13:54.631666Z"}], "thread_id": "Thread-3 (worker)", "execution_time": 0.013991832733154297, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__search_term_report__fivetran_id.aa430d1dad"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:54.631461Z", "completed_at": "2022-10-25T20:13:54.636109Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:54.638912Z", "completed_at": "2022-10-25T20:13:54.638917Z"}], "thread_id": "Thread-2 (worker)", "execution_time": 0.010569095611572266, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads.dbt_utils_unique_combination_of_columns_apple_search_ads__ad_group_report_organization_id__campaign_id__ad_group_id__date_day.19d180bab9"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:54.635849Z", "completed_at": "2022-10-25T20:13:54.639023Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:54.644686Z", "completed_at": "2022-10-25T20:13:54.644690Z"}], "thread_id": "Thread-1 (worker)", "execution_time": 0.010459184646606445, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads.not_null_apple_search_ads__ad_group_report_ad_group_id.60febec6b5"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:54.638835Z", "completed_at": "2022-10-25T20:13:54.644741Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:54.645574Z", "completed_at": "2022-10-25T20:13:54.645577Z"}], "thread_id": "Thread-4 (worker)", "execution_time": 0.010220050811767578, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads.not_null_apple_search_ads__ad_group_report_date_day.e6ffb30b3c"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:54.638978Z", "completed_at": "2022-10-25T20:13:54.645253Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:54.645933Z", "completed_at": "2022-10-25T20:13:54.645936Z"}], "thread_id": "Thread-3 (worker)", "execution_time": 0.013093233108520508, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads.dbt_utils_unique_combination_of_columns_apple_search_ads__ad_report_organization_id__campaign_id__ad_group_id__ad_id__date_day.54e27817a1"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:54.645629Z", "completed_at": "2022-10-25T20:13:54.651859Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:54.652423Z", "completed_at": "2022-10-25T20:13:54.652427Z"}], "thread_id": "Thread-2 (worker)", "execution_time": 0.01055598258972168, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads.not_null_apple_search_ads__ad_report_ad_id.0ab2c5075c"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:54.649482Z", "completed_at": "2022-10-25T20:13:54.652370Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:54.657602Z", "completed_at": "2022-10-25T20:13:54.657606Z"}], "thread_id": "Thread-1 (worker)", "execution_time": 0.01233530044555664, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads.not_null_apple_search_ads__ad_report_date_day.b86c049e17"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:54.652326Z", "completed_at": "2022-10-25T20:13:54.657842Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:54.658662Z", "completed_at": "2022-10-25T20:13:54.658666Z"}], "thread_id": "Thread-4 (worker)", "execution_time": 0.009531974792480469, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads.dbt_utils_unique_combination_of_columns_apple_search_ads__campaign_report_organization_id__campaign_id__date_day.647e56213f"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:54.652481Z", "completed_at": "2022-10-25T20:13:54.658403Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:54.659288Z", "completed_at": "2022-10-25T20:13:54.659291Z"}], "thread_id": "Thread-3 (worker)", "execution_time": 0.009945154190063477, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads.not_null_apple_search_ads__campaign_report_campaign_id.e26ed1e146"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:54.659002Z", "completed_at": "2022-10-25T20:13:54.662351Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:54.666007Z", "completed_at": "2022-10-25T20:13:54.666011Z"}], "thread_id": "Thread-2 (worker)", "execution_time": 0.010890960693359375, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads.not_null_apple_search_ads__campaign_report_date_day.35652b8d1a"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:54.661952Z", "completed_at": "2022-10-25T20:13:54.668780Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:54.671490Z", "completed_at": "2022-10-25T20:13:54.671494Z"}], "thread_id": "Thread-1 (worker)", "execution_time": 0.01318216323852539, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads.dbt_utils_unique_combination_of_columns_apple_search_ads__keyword_report_organization_id__campaign_id__ad_group_id__keyword_id__date_day.78fb033a13"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:54.665866Z", "completed_at": "2022-10-25T20:13:54.671333Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:54.672121Z", "completed_at": "2022-10-25T20:13:54.672126Z"}], "thread_id": "Thread-4 (worker)", "execution_time": 0.010465145111083984, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads.not_null_apple_search_ads__keyword_report_date_day.3dec8d0e82"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:54.668844Z", "completed_at": "2022-10-25T20:13:54.672065Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:54.672825Z", "completed_at": "2022-10-25T20:13:54.672828Z"}], "thread_id": "Thread-3 (worker)", "execution_time": 0.010111093521118164, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads.not_null_apple_search_ads__keyword_report_keyword_id.ea493710db"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:54.672596Z", "completed_at": "2022-10-25T20:13:54.676271Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:54.678785Z", "completed_at": "2022-10-25T20:13:54.678789Z"}], "thread_id": "Thread-2 (worker)", "execution_time": 0.009535074234008789, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads.dbt_utils_unique_combination_of_columns_apple_search_ads__organization_report_organization_id__date_day.8bc84fccc3"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:54.676114Z", "completed_at": "2022-10-25T20:13:54.680905Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:54.684204Z", "completed_at": "2022-10-25T20:13:54.684208Z"}], "thread_id": "Thread-1 (worker)", "execution_time": 0.012161016464233398, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads.not_null_apple_search_ads__organization_report_date_day.5784fed523"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:54.678622Z", "completed_at": "2022-10-25T20:13:54.684023Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:54.684930Z", "completed_at": "2022-10-25T20:13:54.684933Z"}], "thread_id": "Thread-4 (worker)", "execution_time": 0.00958395004272461, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads.not_null_apple_search_ads__organization_report_organization_id.b6cf7d69f8"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:54.680981Z", "completed_at": "2022-10-25T20:13:54.684616Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:54.685549Z", "completed_at": "2022-10-25T20:13:54.685551Z"}], "thread_id": "Thread-3 (worker)", "execution_time": 0.010687112808227539, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads.dbt_utils_unique_combination_of_columns_apple_search_ads__search_term_report_search_term_text__date_day.e60fe79ec4"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:54.685477Z", "completed_at": "2022-10-25T20:13:54.691517Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:54.691731Z", "completed_at": "2022-10-25T20:13:54.691735Z"}], "thread_id": "Thread-2 (worker)", "execution_time": 0.00758814811706543, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads.not_null_apple_search_ads__search_term_report_date_day.1bc3b0d57c"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-25T20:13:54.689405Z", "completed_at": "2022-10-25T20:13:54.691777Z"}, {"name": "execute", "started_at": "2022-10-25T20:13:54.692247Z", "completed_at": "2022-10-25T20:13:54.692250Z"}], "thread_id": "Thread-1 (worker)", "execution_time": 0.0068280696868896484, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads.not_null_apple_search_ads__search_term_report_search_term_text.aecc7447f7"}], "elapsed_time": 3.5940489768981934, "args": {"write_json": true, "use_colors": true, "printer_width": 80, "version_check": true, "partial_parse": true, "static_parser": true, "profiles_dir": "/Users/jamie.rodriguez/.dbt", "send_anonymous_usage_stats": true, "event_buffer_size": 100000, "quiet": false, "no_print": false, "compile": true, "which": "generate", "rpc_method": "docs.generate", "indirect_selection": "eager"}} \ No newline at end of file +{"metadata": {"dbt_schema_version": "https://schemas.getdbt.com/dbt/run-results/v4.json", "dbt_version": "1.3.0", "generated_at": "2022-12-20T03:04:53.127116Z", "invocation_id": "813fddce-ccfb-4c9e-be0f-4fb5725e66b7", "env": {}}, "results": [{"status": "success", "timing": [{"name": "compile", "started_at": "2022-12-20T03:04:51.691307Z", "completed_at": "2022-12-20T03:04:51.710021Z"}, {"name": "execute", "started_at": "2022-12-20T03:04:51.710364Z", "completed_at": "2022-12-20T03:04:51.710374Z"}], "thread_id": "Thread-1", "execution_time": 0.021471023559570312, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.apple_search_ads_source.stg_apple_search_ads__ad_group_history_tmp"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-12-20T03:04:51.716523Z", "completed_at": "2022-12-20T03:04:51.720963Z"}, {"name": "execute", "started_at": "2022-12-20T03:04:51.722115Z", "completed_at": "2022-12-20T03:04:51.722120Z"}], "thread_id": "Thread-1", "execution_time": 0.006438016891479492, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.apple_search_ads_source.stg_apple_search_ads__campaign_history_tmp"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-12-20T03:04:51.691449Z", "completed_at": "2022-12-20T03:04:51.713040Z"}, {"name": "execute", "started_at": "2022-12-20T03:04:51.713325Z", "completed_at": "2022-12-20T03:04:51.713332Z"}], "thread_id": "Thread-2", "execution_time": 0.030675172805786133, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.apple_search_ads_source.stg_apple_search_ads__ad_group_report_tmp"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-12-20T03:04:51.691566Z", "completed_at": "2022-12-20T03:04:51.719791Z"}, {"name": "execute", "started_at": "2022-12-20T03:04:51.721282Z", "completed_at": "2022-12-20T03:04:51.721288Z"}], "thread_id": "Thread-3", "execution_time": 0.03313112258911133, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.apple_search_ads_source.stg_apple_search_ads__ad_history_tmp"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-12-20T03:04:51.691709Z", "completed_at": "2022-12-20T03:04:51.721579Z"}, {"name": "execute", "started_at": "2022-12-20T03:04:51.725159Z", "completed_at": "2022-12-20T03:04:51.725169Z"}], "thread_id": "Thread-4", "execution_time": 0.03626513481140137, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.apple_search_ads_source.stg_apple_search_ads__ad_report_tmp"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-12-20T03:04:51.729430Z", "completed_at": "2022-12-20T03:04:51.744007Z"}, {"name": "execute", "started_at": "2022-12-20T03:04:51.745149Z", "completed_at": "2022-12-20T03:04:51.745161Z"}], "thread_id": "Thread-3", "execution_time": 0.01981377601623535, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.apple_search_ads_source.stg_apple_search_ads__keyword_report_tmp"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-12-20T03:04:51.728733Z", "completed_at": "2022-12-20T03:04:51.742837Z"}, {"name": "execute", "started_at": "2022-12-20T03:04:51.749660Z", "completed_at": "2022-12-20T03:04:51.749668Z"}], "thread_id": "Thread-1", "execution_time": 0.026134014129638672, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.apple_search_ads_source.stg_apple_search_ads__campaign_report_tmp"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-12-20T03:04:51.729095Z", "completed_at": "2022-12-20T03:04:51.744787Z"}, {"name": "execute", "started_at": "2022-12-20T03:04:51.750378Z", "completed_at": "2022-12-20T03:04:51.750385Z"}], "thread_id": "Thread-2", "execution_time": 0.026200056076049805, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.apple_search_ads_source.stg_apple_search_ads__keyword_history_tmp"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-12-20T03:04:51.744956Z", "completed_at": "2022-12-20T03:04:51.750895Z"}, {"name": "execute", "started_at": "2022-12-20T03:04:51.752917Z", "completed_at": "2022-12-20T03:04:51.752926Z"}], "thread_id": "Thread-4", "execution_time": 0.02461099624633789, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.apple_search_ads_source.stg_apple_search_ads__organization_tmp"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-12-20T03:04:51.752210Z", "completed_at": "2022-12-20T03:04:51.758844Z"}, {"name": "execute", "started_at": "2022-12-20T03:04:51.762475Z", "completed_at": "2022-12-20T03:04:51.762483Z"}], "thread_id": "Thread-3", "execution_time": 0.013615846633911133, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.apple_search_ads_source.stg_apple_search_ads__search_term_report_tmp"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-12-20T03:04:51.758424Z", "completed_at": "2022-12-20T03:04:51.762176Z"}, {"name": "execute", "started_at": "2022-12-20T03:04:51.763912Z", "completed_at": "2022-12-20T03:04:51.763921Z"}], "thread_id": "Thread-1", "execution_time": 0.013473033905029297, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.apple_search_ads_integration_tests.ad_group_history_data"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-12-20T03:04:51.758935Z", "completed_at": "2022-12-20T03:04:51.762598Z"}, {"name": "execute", "started_at": "2022-12-20T03:04:51.765677Z", "completed_at": "2022-12-20T03:04:51.765685Z"}], "thread_id": "Thread-2", "execution_time": 0.009654045104980469, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.apple_search_ads_integration_tests.ad_group_report_data"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-12-20T03:04:51.763092Z", "completed_at": "2022-12-20T03:04:51.766246Z"}, {"name": "execute", "started_at": "2022-12-20T03:04:51.767992Z", "completed_at": "2022-12-20T03:04:51.767998Z"}], "thread_id": "Thread-4", "execution_time": 0.008306026458740234, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.apple_search_ads_integration_tests.ad_history_data"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-12-20T03:04:51.768101Z", "completed_at": "2022-12-20T03:04:51.771677Z"}, {"name": "execute", "started_at": "2022-12-20T03:04:51.775068Z", "completed_at": "2022-12-20T03:04:51.775077Z"}], "thread_id": "Thread-3", "execution_time": 0.009293079376220703, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.apple_search_ads_integration_tests.ad_report_data"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-12-20T03:04:51.771271Z", "completed_at": "2022-12-20T03:04:51.774771Z"}, {"name": "execute", "started_at": "2022-12-20T03:04:51.776036Z", "completed_at": "2022-12-20T03:04:51.776042Z"}], "thread_id": "Thread-1", "execution_time": 0.010231971740722656, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.apple_search_ads_integration_tests.campaign_history_data"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-12-20T03:04:51.775364Z", "completed_at": "2022-12-20T03:04:51.778017Z"}, {"name": "execute", "started_at": "2022-12-20T03:04:51.779195Z", "completed_at": "2022-12-20T03:04:51.779199Z"}], "thread_id": "Thread-4", "execution_time": 0.007760047912597656, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.apple_search_ads_integration_tests.keyword_history_data"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-12-20T03:04:51.771803Z", "completed_at": "2022-12-20T03:04:51.775187Z"}, {"name": "execute", "started_at": "2022-12-20T03:04:51.777546Z", "completed_at": "2022-12-20T03:04:51.777550Z"}], "thread_id": "Thread-2", "execution_time": 0.010502815246582031, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.apple_search_ads_integration_tests.campaign_report_data"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-12-20T03:04:51.779377Z", "completed_at": "2022-12-20T03:04:51.781084Z"}, {"name": "execute", "started_at": "2022-12-20T03:04:51.783108Z", "completed_at": "2022-12-20T03:04:51.783117Z"}], "thread_id": "Thread-3", "execution_time": 0.005693912506103516, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.apple_search_ads_integration_tests.keyword_report_data"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-12-20T03:04:51.783357Z", "completed_at": "2022-12-20T03:04:51.786825Z"}, {"name": "execute", "started_at": "2022-12-20T03:04:51.794636Z", "completed_at": "2022-12-20T03:04:51.794643Z"}], "thread_id": "Thread-1", "execution_time": 0.013542890548706055, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.apple_search_ads_integration_tests.organization_data"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-12-20T03:04:51.784129Z", "completed_at": "2022-12-20T03:04:51.794209Z"}, {"name": "execute", "started_at": "2022-12-20T03:04:51.794858Z", "completed_at": "2022-12-20T03:04:51.794860Z"}], "thread_id": "Thread-4", "execution_time": 0.017226219177246094, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.apple_search_ads_integration_tests.search_term_report_data"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-12-20T03:04:51.801394Z", "completed_at": "2022-12-20T03:04:52.101223Z"}, {"name": "execute", "started_at": "2022-12-20T03:04:52.101461Z", "completed_at": "2022-12-20T03:04:52.101469Z"}], "thread_id": "Thread-4", "execution_time": 0.3448829650878906, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.apple_search_ads_source.stg_apple_search_ads__ad_history"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-12-20T03:04:51.785484Z", "completed_at": "2022-12-20T03:04:52.092836Z"}, {"name": "execute", "started_at": "2022-12-20T03:04:52.093041Z", "completed_at": "2022-12-20T03:04:52.093048Z"}], "thread_id": "Thread-2", "execution_time": 0.3850090503692627, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.apple_search_ads_source.stg_apple_search_ads__ad_group_history"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-12-20T03:04:51.794784Z", "completed_at": "2022-12-20T03:04:52.172161Z"}, {"name": "execute", "started_at": "2022-12-20T03:04:52.173707Z", "completed_at": "2022-12-20T03:04:52.173711Z"}], "thread_id": "Thread-3", "execution_time": 0.4076700210571289, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.apple_search_ads_source.stg_apple_search_ads__campaign_history"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-12-20T03:04:51.801487Z", "completed_at": "2022-12-20T03:04:52.172910Z"}, {"name": "execute", "started_at": "2022-12-20T03:04:52.173137Z", "completed_at": "2022-12-20T03:04:52.173144Z"}], "thread_id": "Thread-1", "execution_time": 0.4022960662841797, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.apple_search_ads_source.stg_apple_search_ads__ad_group_report"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-12-20T03:04:52.145985Z", "completed_at": "2022-12-20T03:04:52.426542Z"}, {"name": "execute", "started_at": "2022-12-20T03:04:52.426747Z", "completed_at": "2022-12-20T03:04:52.426757Z"}], "thread_id": "Thread-4", "execution_time": 0.3084290027618408, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.apple_search_ads_source.stg_apple_search_ads__ad_report"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-12-20T03:04:52.203900Z", "completed_at": "2022-12-20T03:04:52.547869Z"}, {"name": "execute", "started_at": "2022-12-20T03:04:52.549058Z", "completed_at": "2022-12-20T03:04:52.549079Z"}], "thread_id": "Thread-3", "execution_time": 0.3728957176208496, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.apple_search_ads_source.stg_apple_search_ads__campaign_report"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-12-20T03:04:52.204025Z", "completed_at": "2022-12-20T03:04:52.551533Z"}, {"name": "execute", "started_at": "2022-12-20T03:04:52.551860Z", "completed_at": "2022-12-20T03:04:52.551867Z"}], "thread_id": "Thread-1", "execution_time": 0.4041759967803955, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.apple_search_ads_source.stg_apple_search_ads__keyword_history"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-12-20T03:04:52.608130Z", "completed_at": "2022-12-20T03:04:52.618001Z"}, {"name": "execute", "started_at": "2022-12-20T03:04:52.618213Z", "completed_at": "2022-12-20T03:04:52.618221Z"}], "thread_id": "Thread-1", "execution_time": 0.01069021224975586, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__ad_history_ad_id__modified_at.38599b8cba"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-12-20T03:04:52.619080Z", "completed_at": "2022-12-20T03:04:52.625245Z"}, {"name": "execute", "started_at": "2022-12-20T03:04:52.625447Z", "completed_at": "2022-12-20T03:04:52.625454Z"}], "thread_id": "Thread-1", "execution_time": 0.0069599151611328125, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_history_ad_id.4ad3bde32a"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-12-20T03:04:52.626641Z", "completed_at": "2022-12-20T03:04:52.633737Z"}, {"name": "execute", "started_at": "2022-12-20T03:04:52.634111Z", "completed_at": "2022-12-20T03:04:52.634119Z"}], "thread_id": "Thread-1", "execution_time": 0.008301019668579102, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_history_modified_at.2eea7e006d"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-12-20T03:04:52.635358Z", "completed_at": "2022-12-20T03:04:52.639684Z"}, {"name": "execute", "started_at": "2022-12-20T03:04:52.640066Z", "completed_at": "2022-12-20T03:04:52.640074Z"}], "thread_id": "Thread-1", "execution_time": 0.0053310394287109375, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__ad_group_history_ad_group_id__modified_at.84af14c83b"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-12-20T03:04:52.641937Z", "completed_at": "2022-12-20T03:04:52.646085Z"}, {"name": "execute", "started_at": "2022-12-20T03:04:52.646284Z", "completed_at": "2022-12-20T03:04:52.646291Z"}], "thread_id": "Thread-1", "execution_time": 0.005068063735961914, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_group_history_ad_group_id.dc128eecb7"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-12-20T03:04:52.647772Z", "completed_at": "2022-12-20T03:04:52.651929Z"}, {"name": "execute", "started_at": "2022-12-20T03:04:52.652116Z", "completed_at": "2022-12-20T03:04:52.652122Z"}], "thread_id": "Thread-1", "execution_time": 0.0050432682037353516, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_group_history_modified_at.e5d65fa28f"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-12-20T03:04:52.652950Z", "completed_at": "2022-12-20T03:04:52.656834Z"}, {"name": "execute", "started_at": "2022-12-20T03:04:52.657023Z", "completed_at": "2022-12-20T03:04:52.657030Z"}], "thread_id": "Thread-1", "execution_time": 0.0046539306640625, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__campaign_history_campaign_id__modified_at.317f970af9"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-12-20T03:04:52.658278Z", "completed_at": "2022-12-20T03:04:52.661515Z"}, {"name": "execute", "started_at": "2022-12-20T03:04:52.661710Z", "completed_at": "2022-12-20T03:04:52.661717Z"}], "thread_id": "Thread-1", "execution_time": 0.004277944564819336, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__campaign_history_campaign_id.3f0f7502b8"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-12-20T03:04:52.663693Z", "completed_at": "2022-12-20T03:04:52.666974Z"}, {"name": "execute", "started_at": "2022-12-20T03:04:52.667175Z", "completed_at": "2022-12-20T03:04:52.667182Z"}], "thread_id": "Thread-1", "execution_time": 0.005222797393798828, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__campaign_history_modified_at.f34a7a97c9"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-12-20T03:04:52.667994Z", "completed_at": "2022-12-20T03:04:52.671893Z"}, {"name": "execute", "started_at": "2022-12-20T03:04:52.672106Z", "completed_at": "2022-12-20T03:04:52.672113Z"}], "thread_id": "Thread-1", "execution_time": 0.0046961307525634766, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__ad_group_report_ad_group_id__date_day.a0fcc4e33c"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-12-20T03:04:52.672951Z", "completed_at": "2022-12-20T03:04:52.682607Z"}, {"name": "execute", "started_at": "2022-12-20T03:04:52.682800Z", "completed_at": "2022-12-20T03:04:52.682806Z"}], "thread_id": "Thread-1", "execution_time": 0.010428905487060547, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_group_report_ad_group_id.a115f9cfc1"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-12-20T03:04:52.684619Z", "completed_at": "2022-12-20T03:04:52.690927Z"}, {"name": "execute", "started_at": "2022-12-20T03:04:52.691142Z", "completed_at": "2022-12-20T03:04:52.691151Z"}], "thread_id": "Thread-1", "execution_time": 0.007894754409790039, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_group_report_date_day.4dfd46a43b"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-12-20T03:04:52.692162Z", "completed_at": "2022-12-20T03:04:52.696258Z"}, {"name": "execute", "started_at": "2022-12-20T03:04:52.696445Z", "completed_at": "2022-12-20T03:04:52.696452Z"}], "thread_id": "Thread-1", "execution_time": 0.004873991012573242, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__ad_report_ad_id__date_day__ad_group_id.0d8d23c516"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-12-20T03:04:52.697264Z", "completed_at": "2022-12-20T03:04:52.700753Z"}, {"name": "execute", "started_at": "2022-12-20T03:04:52.700992Z", "completed_at": "2022-12-20T03:04:52.700999Z"}], "thread_id": "Thread-1", "execution_time": 0.004338979721069336, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_report_ad_group_id.a397755e9f"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-12-20T03:04:52.701914Z", "completed_at": "2022-12-20T03:04:52.713907Z"}, {"name": "execute", "started_at": "2022-12-20T03:04:52.714295Z", "completed_at": "2022-12-20T03:04:52.714303Z"}], "thread_id": "Thread-1", "execution_time": 0.013044118881225586, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_report_ad_id.d08e760c58"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-12-20T03:04:52.716109Z", "completed_at": "2022-12-20T03:04:52.719490Z"}, {"name": "execute", "started_at": "2022-12-20T03:04:52.719684Z", "completed_at": "2022-12-20T03:04:52.719692Z"}], "thread_id": "Thread-1", "execution_time": 0.004282951354980469, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__ad_report_date_day.e6252346d8"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-12-20T03:04:52.722732Z", "completed_at": "2022-12-20T03:04:52.726741Z"}, {"name": "execute", "started_at": "2022-12-20T03:04:52.726942Z", "completed_at": "2022-12-20T03:04:52.726948Z"}], "thread_id": "Thread-1", "execution_time": 0.005155801773071289, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__campaign_report_campaign_id__date_day.bad41b0481"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-12-20T03:04:52.727840Z", "completed_at": "2022-12-20T03:04:52.732085Z"}, {"name": "execute", "started_at": "2022-12-20T03:04:52.732298Z", "completed_at": "2022-12-20T03:04:52.732304Z"}], "thread_id": "Thread-1", "execution_time": 0.005043983459472656, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__campaign_report_campaign_id.b83941e728"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-12-20T03:04:52.733106Z", "completed_at": "2022-12-20T03:04:52.736196Z"}, {"name": "execute", "started_at": "2022-12-20T03:04:52.736378Z", "completed_at": "2022-12-20T03:04:52.736384Z"}], "thread_id": "Thread-1", "execution_time": 0.0038328170776367188, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__campaign_report_date_day.c8dc10a6f3"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-12-20T03:04:52.737188Z", "completed_at": "2022-12-20T03:04:52.740963Z"}, {"name": "execute", "started_at": "2022-12-20T03:04:52.741155Z", "completed_at": "2022-12-20T03:04:52.741163Z"}], "thread_id": "Thread-1", "execution_time": 0.004551887512207031, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__keyword_history_keyword_id__modified_at.7b06162d24"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-12-20T03:04:52.741972Z", "completed_at": "2022-12-20T03:04:52.756292Z"}, {"name": "execute", "started_at": "2022-12-20T03:04:52.756489Z", "completed_at": "2022-12-20T03:04:52.756497Z"}], "thread_id": "Thread-1", "execution_time": 0.015098810195922852, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__keyword_history_keyword_id.889f83cfd2"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-12-20T03:04:52.757367Z", "completed_at": "2022-12-20T03:04:52.760714Z"}, {"name": "execute", "started_at": "2022-12-20T03:04:52.760912Z", "completed_at": "2022-12-20T03:04:52.760920Z"}], "thread_id": "Thread-1", "execution_time": 0.00415492057800293, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__keyword_history_modified_at.42fde5a287"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-12-20T03:04:52.576444Z", "completed_at": "2022-12-20T03:04:52.864497Z"}, {"name": "execute", "started_at": "2022-12-20T03:04:52.864710Z", "completed_at": "2022-12-20T03:04:52.864718Z"}], "thread_id": "Thread-3", "execution_time": 0.3175499439239502, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.apple_search_ads_source.stg_apple_search_ads__search_term_report"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-12-20T03:04:52.894532Z", "completed_at": "2022-12-20T03:04:52.899244Z"}, {"name": "execute", "started_at": "2022-12-20T03:04:52.902587Z", "completed_at": "2022-12-20T03:04:52.902597Z"}], "thread_id": "Thread-1", "execution_time": 0.008738040924072266, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__search_term_report__fivetran_id__date_day.aad2a48344"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-12-20T03:04:52.899116Z", "completed_at": "2022-12-20T03:04:52.903717Z"}, {"name": "execute", "started_at": "2022-12-20T03:04:52.904102Z", "completed_at": "2022-12-20T03:04:52.904107Z"}], "thread_id": "Thread-3", "execution_time": 0.00890207290649414, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__search_term_report__fivetran_id.aa430d1dad"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-12-20T03:04:52.904021Z", "completed_at": "2022-12-20T03:04:52.907969Z"}, {"name": "execute", "started_at": "2022-12-20T03:04:52.908175Z", "completed_at": "2022-12-20T03:04:52.908181Z"}], "thread_id": "Thread-1", "execution_time": 0.00502777099609375, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__search_term_report_date_day.fd93df3302"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-12-20T03:04:52.175706Z", "completed_at": "2022-12-20T03:04:52.930986Z"}, {"name": "execute", "started_at": "2022-12-20T03:04:52.931189Z", "completed_at": "2022-12-20T03:04:52.931198Z"}], "thread_id": "Thread-2", "execution_time": 0.7832770347595215, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.apple_search_ads_source.stg_apple_search_ads__keyword_report"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-12-20T03:04:52.961122Z", "completed_at": "2022-12-20T03:04:52.972120Z"}, {"name": "execute", "started_at": "2022-12-20T03:04:52.972748Z", "completed_at": "2022-12-20T03:04:52.972755Z"}], "thread_id": "Thread-1", "execution_time": 0.013828039169311523, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__keyword_report_date_day.16098db928"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-12-20T03:04:52.961236Z", "completed_at": "2022-12-20T03:04:52.972244Z"}, {"name": "execute", "started_at": "2022-12-20T03:04:52.972834Z", "completed_at": "2022-12-20T03:04:52.972836Z"}], "thread_id": "Thread-2", "execution_time": 0.013776779174804688, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__keyword_report_keyword_id.501725b09e"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-12-20T03:04:52.960993Z", "completed_at": "2022-12-20T03:04:52.972341Z"}, {"name": "execute", "started_at": "2022-12-20T03:04:52.972911Z", "completed_at": "2022-12-20T03:04:52.972913Z"}], "thread_id": "Thread-3", "execution_time": 0.014828681945800781, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__keyword_report_keyword_id__date_day.9f0099cff8"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-12-20T03:04:52.455158Z", "completed_at": "2022-12-20T03:04:52.957520Z"}, {"name": "execute", "started_at": "2022-12-20T03:04:52.958434Z", "completed_at": "2022-12-20T03:04:52.958445Z"}], "thread_id": "Thread-4", "execution_time": 0.5330619812011719, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.apple_search_ads_source.stg_apple_search_ads__organization"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-12-20T03:04:52.990412Z", "completed_at": "2022-12-20T03:04:53.015179Z"}, {"name": "execute", "started_at": "2022-12-20T03:04:53.016315Z", "completed_at": "2022-12-20T03:04:53.016325Z"}], "thread_id": "Thread-2", "execution_time": 0.0278778076171875, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.apple_search_ads.apple_search_ads__ad_report"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-12-20T03:04:52.990321Z", "completed_at": "2022-12-20T03:04:53.015304Z"}, {"name": "execute", "started_at": "2022-12-20T03:04:53.016437Z", "completed_at": "2022-12-20T03:04:53.016439Z"}], "thread_id": "Thread-1", "execution_time": 0.02862071990966797, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.apple_search_ads.apple_search_ads__ad_group_report"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-12-20T03:04:52.990557Z", "completed_at": "2022-12-20T03:04:53.015558Z"}, {"name": "execute", "started_at": "2022-12-20T03:04:53.016704Z", "completed_at": "2022-12-20T03:04:53.016710Z"}], "thread_id": "Thread-3", "execution_time": 0.028553247451782227, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.apple_search_ads.apple_search_ads__campaign_report"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-12-20T03:04:52.990668Z", "completed_at": "2022-12-20T03:04:53.016044Z"}, {"name": "execute", "started_at": "2022-12-20T03:04:53.017753Z", "completed_at": "2022-12-20T03:04:53.017758Z"}], "thread_id": "Thread-4", "execution_time": 0.030426740646362305, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.apple_search_ads.apple_search_ads__keyword_report"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-12-20T03:04:53.022171Z", "completed_at": "2022-12-20T03:04:53.037069Z"}, {"name": "execute", "started_at": "2022-12-20T03:04:53.038083Z", "completed_at": "2022-12-20T03:04:53.038089Z"}], "thread_id": "Thread-2", "execution_time": 0.018025875091552734, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.apple_search_ads.apple_search_ads__organization_report"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-12-20T03:04:53.022259Z", "completed_at": "2022-12-20T03:04:53.037349Z"}, {"name": "execute", "started_at": "2022-12-20T03:04:53.038167Z", "completed_at": "2022-12-20T03:04:53.038171Z"}], "thread_id": "Thread-1", "execution_time": 0.018155813217163086, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.apple_search_ads.apple_search_ads__search_term_report"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-12-20T03:04:53.022428Z", "completed_at": "2022-12-20T03:04:53.037583Z"}, {"name": "execute", "started_at": "2022-12-20T03:04:53.038325Z", "completed_at": "2022-12-20T03:04:53.038328Z"}], "thread_id": "Thread-3", "execution_time": 0.018222808837890625, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads_source.dbt_utils_unique_combination_of_columns_stg_apple_search_ads__organization_organization_id.8647048f7a"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-12-20T03:04:53.030837Z", "completed_at": "2022-12-20T03:04:53.037901Z"}, {"name": "execute", "started_at": "2022-12-20T03:04:53.039195Z", "completed_at": "2022-12-20T03:04:53.039200Z"}], "thread_id": "Thread-4", "execution_time": 0.018577098846435547, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads_source.not_null_stg_apple_search_ads__organization_organization_id.b013ce33cb"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-12-20T03:04:53.042409Z", "completed_at": "2022-12-20T03:04:53.056611Z"}, {"name": "execute", "started_at": "2022-12-20T03:04:53.057437Z", "completed_at": "2022-12-20T03:04:53.057443Z"}], "thread_id": "Thread-1", "execution_time": 0.01700305938720703, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads.not_null_apple_search_ads__ad_report_ad_id.0ab2c5075c"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-12-20T03:04:53.042328Z", "completed_at": "2022-12-20T03:04:53.056684Z"}, {"name": "execute", "started_at": "2022-12-20T03:04:53.057587Z", "completed_at": "2022-12-20T03:04:53.057589Z"}], "thread_id": "Thread-2", "execution_time": 0.01780414581298828, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads.dbt_utils_unique_combination_of_columns_apple_search_ads__ad_report_organization_id__campaign_id__ad_group_id__ad_id__date_day.54e27817a1"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-12-20T03:04:53.042555Z", "completed_at": "2022-12-20T03:04:53.056986Z"}, {"name": "execute", "started_at": "2022-12-20T03:04:53.057658Z", "completed_at": "2022-12-20T03:04:53.057660Z"}], "thread_id": "Thread-3", "execution_time": 0.0174410343170166, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads.not_null_apple_search_ads__ad_report_date_day.b86c049e17"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-12-20T03:04:53.050265Z", "completed_at": "2022-12-20T03:04:53.057214Z"}, {"name": "execute", "started_at": "2022-12-20T03:04:53.058060Z", "completed_at": "2022-12-20T03:04:53.058072Z"}], "thread_id": "Thread-4", "execution_time": 0.017309904098510742, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads.dbt_utils_unique_combination_of_columns_apple_search_ads__ad_group_report_organization_id__campaign_id__ad_group_id__date_day.19d180bab9"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-12-20T03:04:53.061447Z", "completed_at": "2022-12-20T03:04:53.074680Z"}, {"name": "execute", "started_at": "2022-12-20T03:04:53.075518Z", "completed_at": "2022-12-20T03:04:53.075526Z"}], "thread_id": "Thread-1", "execution_time": 0.016325712203979492, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads.not_null_apple_search_ads__ad_group_report_ad_group_id.60febec6b5"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-12-20T03:04:53.061603Z", "completed_at": "2022-12-20T03:04:53.074940Z"}, {"name": "execute", "started_at": "2022-12-20T03:04:53.075703Z", "completed_at": "2022-12-20T03:04:53.075706Z"}], "thread_id": "Thread-2", "execution_time": 0.016431808471679688, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads.not_null_apple_search_ads__ad_group_report_date_day.e6ffb30b3c"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-12-20T03:04:53.061675Z", "completed_at": "2022-12-20T03:04:53.075226Z"}, {"name": "execute", "started_at": "2022-12-20T03:04:53.076347Z", "completed_at": "2022-12-20T03:04:53.076354Z"}], "thread_id": "Thread-3", "execution_time": 0.016850948333740234, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads.dbt_utils_unique_combination_of_columns_apple_search_ads__campaign_report_organization_id__campaign_id__date_day.647e56213f"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-12-20T03:04:53.064648Z", "completed_at": "2022-12-20T03:04:53.075424Z"}, {"name": "execute", "started_at": "2022-12-20T03:04:53.076858Z", "completed_at": "2022-12-20T03:04:53.076863Z"}], "thread_id": "Thread-4", "execution_time": 0.01696181297302246, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads.not_null_apple_search_ads__campaign_report_campaign_id.e26ed1e146"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-12-20T03:04:53.079925Z", "completed_at": "2022-12-20T03:04:53.090765Z"}, {"name": "execute", "started_at": "2022-12-20T03:04:53.094501Z", "completed_at": "2022-12-20T03:04:53.094509Z"}], "thread_id": "Thread-1", "execution_time": 0.016973018646240234, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads.not_null_apple_search_ads__campaign_report_date_day.35652b8d1a"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-12-20T03:04:53.080179Z", "completed_at": "2022-12-20T03:04:53.093577Z"}, {"name": "execute", "started_at": "2022-12-20T03:04:53.094793Z", "completed_at": "2022-12-20T03:04:53.094801Z"}], "thread_id": "Thread-2", "execution_time": 0.017094135284423828, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads.dbt_utils_unique_combination_of_columns_apple_search_ads__keyword_report_organization_id__campaign_id__ad_group_id__keyword_id__date_day.78fb033a13"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-12-20T03:04:53.083382Z", "completed_at": "2022-12-20T03:04:53.094158Z"}, {"name": "execute", "started_at": "2022-12-20T03:04:53.095415Z", "completed_at": "2022-12-20T03:04:53.095422Z"}], "thread_id": "Thread-3", "execution_time": 0.017174243927001953, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads.not_null_apple_search_ads__keyword_report_date_day.3dec8d0e82"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-12-20T03:04:53.087734Z", "completed_at": "2022-12-20T03:04:53.094574Z"}, {"name": "execute", "started_at": "2022-12-20T03:04:53.096065Z", "completed_at": "2022-12-20T03:04:53.096072Z"}], "thread_id": "Thread-4", "execution_time": 0.017454147338867188, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads.not_null_apple_search_ads__keyword_report_keyword_id.ea493710db"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-12-20T03:04:53.098380Z", "completed_at": "2022-12-20T03:04:53.110013Z"}, {"name": "execute", "started_at": "2022-12-20T03:04:53.114219Z", "completed_at": "2022-12-20T03:04:53.114228Z"}], "thread_id": "Thread-1", "execution_time": 0.018032073974609375, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads.dbt_utils_unique_combination_of_columns_apple_search_ads__organization_report_organization_id__date_day.8bc84fccc3"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-12-20T03:04:53.098800Z", "completed_at": "2022-12-20T03:04:53.114335Z"}, {"name": "execute", "started_at": "2022-12-20T03:04:53.115292Z", "completed_at": "2022-12-20T03:04:53.115296Z"}], "thread_id": "Thread-2", "execution_time": 0.018677949905395508, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads.not_null_apple_search_ads__organization_report_date_day.5784fed523"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-12-20T03:04:53.102926Z", "completed_at": "2022-12-20T03:04:53.115055Z"}, {"name": "execute", "started_at": "2022-12-20T03:04:53.116312Z", "completed_at": "2022-12-20T03:04:53.116316Z"}], "thread_id": "Thread-3", "execution_time": 0.01896810531616211, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads.not_null_apple_search_ads__organization_report_organization_id.b6cf7d69f8"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-12-20T03:04:53.106915Z", "completed_at": "2022-12-20T03:04:53.115365Z"}, {"name": "execute", "started_at": "2022-12-20T03:04:53.116686Z", "completed_at": "2022-12-20T03:04:53.116690Z"}], "thread_id": "Thread-4", "execution_time": 0.019255876541137695, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads.dbt_utils_unique_combination_of_columns_apple_search_ads__search_term_report_search_term_text__date_day.e60fe79ec4"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-12-20T03:04:53.117162Z", "completed_at": "2022-12-20T03:04:53.124545Z"}, {"name": "execute", "started_at": "2022-12-20T03:04:53.124812Z", "completed_at": "2022-12-20T03:04:53.124819Z"}], "thread_id": "Thread-1", "execution_time": 0.009610176086425781, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads.not_null_apple_search_ads__search_term_report_date_day.1bc3b0d57c"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-12-20T03:04:53.121417Z", "completed_at": "2022-12-20T03:04:53.124887Z"}, {"name": "execute", "started_at": "2022-12-20T03:04:53.125656Z", "completed_at": "2022-12-20T03:04:53.125660Z"}], "thread_id": "Thread-2", "execution_time": 0.008635282516479492, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.apple_search_ads.not_null_apple_search_ads__search_term_report_search_term_text.aecc7447f7"}], "elapsed_time": 3.5442628860473633, "args": {"write_json": true, "use_colors": true, "printer_width": 80, "version_check": true, "partial_parse": true, "static_parser": true, "profiles_dir": "/Users/joseph.markiewicz/.dbt", "send_anonymous_usage_stats": true, "event_buffer_size": 100000, "quiet": false, "no_print": false, "target": "postgres", "compile": true, "which": "generate", "rpc_method": "docs.generate", "indirect_selection": "eager"}} \ No newline at end of file From 44d5d36372de17c3d462f3114f2e6f4de2c27136 Mon Sep 17 00:00:00 2001 From: fivetran-joemarkiewicz Date: Mon, 19 Dec 2022 21:16:43 -0600 Subject: [PATCH 17/18] schema change --- integration_tests/ci/sample.profiles.yml | 10 +++++----- integration_tests/dbt_project.yml | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/integration_tests/ci/sample.profiles.yml b/integration_tests/ci/sample.profiles.yml index 8a55656..40884d0 100644 --- a/integration_tests/ci/sample.profiles.yml +++ b/integration_tests/ci/sample.profiles.yml @@ -16,13 +16,13 @@ integration_tests: pass: "{{ env_var('CI_REDSHIFT_DBT_PASS') }}" dbname: "{{ env_var('CI_REDSHIFT_DBT_DBNAME') }}" port: 5439 - schema: apple_search_ads_integration_tests + schema: apple_search_ads_integrations_tests_1 threads: 8 bigquery: type: bigquery method: service-account-json project: 'dbt-package-testing' - schema: apple_search_ads_integration_tests + schema: apple_search_ads_integrations_tests_1 threads: 8 keyfile_json: "{{ env_var('GCLOUD_SERVICE_KEY') | as_native }}" snowflake: @@ -33,7 +33,7 @@ integration_tests: role: "{{ env_var('CI_SNOWFLAKE_DBT_ROLE') }}" database: "{{ env_var('CI_SNOWFLAKE_DBT_DATABASE') }}" warehouse: "{{ env_var('CI_SNOWFLAKE_DBT_WAREHOUSE') }}" - schema: apple_search_ads_integration_tests + schema: apple_search_ads_integrations_tests_1 threads: 8 postgres: type: postgres @@ -42,13 +42,13 @@ integration_tests: pass: "{{ env_var('CI_POSTGRES_DBT_PASS') }}" dbname: "{{ env_var('CI_POSTGRES_DBT_DBNAME') }}" port: 5432 - schema: apple_search_ads_integration_tests + schema: apple_search_ads_integrations_tests_1 threads: 8 databricks: catalog: null host: "{{ env_var('CI_DATABRICKS_DBT_HOST') }}" http_path: "{{ env_var('CI_DATABRICKS_DBT_HTTP_PATH') }}" - schema: apple_search_ads_integration_tests + schema: apple_search_ads_integrations_tests_1 threads: 2 token: "{{ env_var('CI_DATABRICKS_DBT_TOKEN') }}" type: databricks \ No newline at end of file diff --git a/integration_tests/dbt_project.yml b/integration_tests/dbt_project.yml index 25841b3..8a53efe 100644 --- a/integration_tests/dbt_project.yml +++ b/integration_tests/dbt_project.yml @@ -6,7 +6,7 @@ version: '0.2.0' profile: 'integration_tests' vars: - apple_search_ads_schema: apple_search_ads_integration_tests + apple_search_ads_schema: apple_search_ads_integrations_tests_1 apple_search_ads_organization_identifier: "organization_data" apple_search_ads_campaign_history_identifier: "campaign_history_data" apple_search_ads_campaign_report_identifier: "campaign_report_data" From 8fa32f5d691952e24872e137f3a209fee8c0a58c Mon Sep 17 00:00:00 2001 From: fivetran-joemarkiewicz Date: Wed, 21 Dec 2022 10:39:40 -0600 Subject: [PATCH 18/18] update package dependency --- packages.yml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/packages.yml b/packages.yml index 3804b34..d36ed44 100644 --- a/packages.yml +++ b/packages.yml @@ -1,7 +1,3 @@ packages: -# - package: fivetran/apple_search_ads_source -# version: [">=0.2.0", "<0.3.0"] - -- git: https://github.com/fivetran/dbt_apple_search_ads_source.git - revision: MagicBot/dbt-utils-cross-db-migration - warn-unpinned: false \ No newline at end of file +- package: fivetran/apple_search_ads_source + version: [">=0.2.0", "<0.3.0"] \ No newline at end of file